Home Forums WTI Like Post PRO How to display like count on post lists?

Tagged: , , ,

This topic contains 1 reply, has 2 voices, and was last updated by  Webtechideas 3 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #59

    mettacell
    Participant

    I was wondering if its possible to display the like/unlike counts by using a php snippet? Such as to display comment counts by

    <?php comments_number( $zero, $one, $more ); ?>

    Any help will be highly appreciated. Thank you

    #60

    Webtechideas
    Keymaster

    Yes, its possible by using the following get_post_meta code as below

    $like_value = get_post_meta($id, '_wti_like_count', true);
    $unlike_value = get_post_meta($id, '_wti_unlike_count', true);
    $total_value = get_post_meta($id, '_wti_total_count', true);

    Here $id is the post id.

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.