Home Forums WTI Like Post PRO Post Likes of User

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #402
    desert333
    Participant

    In your pro version in WIDGET section this function to show only Likes of User is working good.

    When I want to use your template file to show like within my own custom profile page is not working at all.

    content-likes.php (template)

    I added

    <?php get_template_part( 'content', 'likes' ); ?>

    inside my custom profile page to show all likes of that user and what I got is:

    Favorite Posts
    Nothing Found

    I checked content-likes.php and I guess he can’t locate that user to get post likes…

    I was trying to get code from WIDGET file here all is working fine but there is too much code… which to take

    How to fix it ?

    Thanks for help!

    #405
    desert333
    Participant

    1. Can you help me get this code to show post likes of logged user (from widget) ?
    So I can use on inside page (not sidebar)

    2. Also I need to make work post likes of user page (to show all post likes for each user on their profile page) content-likes.php gives error nothing found… there is any variable I have to change/fix ?

    Thanks for help!

    #408
    Webtechideas
    Keymaster

    We checked the code and it’s working correctly. Please make sure that the user you are trying to check has already liked some posts on your site while logged in.

    You can also echo the query in the content-likes file and run that on phpmyadmin to see the results. We are sure it will pick up the user id but there won’t be anything for him in the wti_like_posts table for which it’s not showing any result. In case it does not pick the user id, you can simply hard code with any user id and see it’s now loading anything or not. If there is any error in the query, you can also see that.

    Thanks

    #411
    desert333
    Participant

    Thank you for reply.

    Quick question – template “content-likes.php” is designed to shows likes of LOGGED In user only (means this user can see ONLY his likes when is logged in) ? Or to show likes of ANY User I want by going to his user page (means anybody can see likes of that user doesnt have to be logged in) ?

    =========================================================

    Regarding your reply.
    Yes database is fine , there are stored likes of user I am requesting (anyway Your Widget is working perfectly on that)

    The bug is in the content-likes.php template file. I double checked that and it doesnt find any user name.

    I tried with :
    <?php echo $author; ?>
    It replies with nothing, means it doesnt catch user…

    The problem is with :
    $author = get_user_by('slug', get_query_var('author_name'));

    I forced to show likes to only specific user and it worked fine.

    maybe there is a way to get user id from link ? each user has a link like http://www.domain.com/user/XXXX
    – So we can feed that data XXXX then its done.

    Thanks

    #412
    desert333
    Participant

    ALL SOLVED.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘WTI Like Post PRO’ is closed to new topics and replies.