Home Forums WTI Like Post PRO Counts all show zero

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #332
    mtnhops
    Participant

    I’ve placed the following in a function at top of post content inside loop, but all three show 0 even when there are likes/dislikes. What am I doing wrong?

    echo GetWtiLikeCount($post->ID);
    echo GetWtiTotalCount($post->ID);
    echo GetWtiUnLikeCount($post->ID);

    #336
    Webtechideas
    Keymaster

    Please put the loop code you are using. If that file is long, then you can e-mail that to us. Can you please also share your site url?

    #337
    mtnhops
    Participant

    The site is currently on local but I can put it on a temp server soon.

    I’m using a genesis child theme, so using action hook that places code in the entry header (also tried entry content) inside the post loop everywhere – so on blog index, single post, etc. Here is code (I also tried not passing post ID since inside the loop). All cases return the correct thumbs up/down and that part works, but outputs a 0 for total count.

    add_action('genesis_entry_header', 'wti_add_votes');
    function wti_add_votes() {
    	echo GetWtiLikePost($post->ID);
    	GetWtiTotalCount($post->ID);
    }
    #338
    Webtechideas
    Keymaster

    I do not understand what you are trying to achieve. First you said you want to show the like/dislike counts but here you have put the GetWtiLikePost function. Also check for how to implement action hook here. You should echo the total count. It would be helpful if you can set up a temp server with sharing access to us.

    Thanks

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