Home › Forums › WTI Like Post PRO › Number of votes
Tagged: custom post type, vites
- This topic has 9 replies, 3 voices, and was last updated 10 years, 3 months ago by
Webtechideas.
-
AuthorPosts
-
May 13, 2015 at 2:42 am #309
RayJay
ParticipantPlease help me display number of votes. Is there a hook for this?
Or standard query, define, then display with a <?php blah-blah?>
Sorry, up late several days now trying to figure this out.
Cheers,
A
May 13, 2015 at 5:47 pm #314Webtechideas
KeymasterThe functions are
GetWtiLikeCount($post_id),GetWtiUnlikeCount($post_id),GetWtiTotalCount($post_id)to get the like, unlike and total counts respectively.May 13, 2015 at 8:09 pm #318RayJay
ParticipantThan you! is this how I implement?
<div id="votesbox"><?php GetWtiLikeCount($post_id)?></div></div>a
-
This reply was modified 10 years, 6 months ago by
RayJay.
May 13, 2015 at 9:21 pm #321RayJay
ParticipantThat last post may not have made sense…
What do I wrap that “GetWtiLikeCount($post_id)” custom hook in? Do I have to mention it before the loop first… sorry for my noobiness.
a
May 13, 2015 at 9:24 pm #322RayJay
ParticipantI used
<?php echo GetWtiLikeCount($post_id)?>inside the div that will house the number of votes in my styled list…But it just shows a ‘0’… although there are votes.
Any thoughts?
Thank you!
a
May 13, 2015 at 9:33 pm #323RayJay
ParticipantGOT IT WORKING… used this instead:
<?php echo GetWtiLikeCount($post->ID);?>Thank you!!! now onto get that vote button working. 🙂
Cheers,
a
August 1, 2015 at 12:27 am #353paviod
ParticipantCan you explain how you got this working? I’m trying to do something similar and it’s showing only 0 as a result
August 2, 2015 at 6:37 am #355Webtechideas
KeymasterThe above function GetWtiLikeCount is already available with the plugin. You need to pass the proper variable in place of $post->ID as per your code. Please make sure there are like counts for the post you are checking with.
August 2, 2015 at 5:04 pm #359paviod
ParticipantI’m trying to use <?php echo GetWtiTotalCount($post->ID);?> but it’s outputting 0 even when there are votes. Can you please past in the code needed to showcase total count as a function and be able to output that as a shortcode? This is why I bought the pro version but didn’t think I would have to program that myself.
August 3, 2015 at 2:24 am #363Webtechideas
KeymasterYou can see other users mentioning that it is working for them so there is no reason for this not to work for you. What is the like and unlike count for the post where its showing total as 0? You can share your site url for us to check. You can also send us the file where you are implementing the same. If you are using any theme, then send that as well with your code. We will look into that and suggest.
-
This reply was modified 10 years, 6 months ago by
-
AuthorPosts
- The forum ‘WTI Like Post PRO’ is closed to new topics and replies.