WordPress.org

Forums

Like Button Voting & Rating
[resolved] get only number of likes (8 posts)

  1. The Three
    Member
    Posted 1 year ago #

    hello there!

    1) Is there any way to call with php only the number of likes that have a post?

    2) Is there any way to make an custom way to make a like button px:
    <div id="button" onclick="LikeBtn.vote(1, 1);">Like!</div>

    https://wordpress.org/plugins/likebtn-like-button/

  2. LikeBtn
    Member
    Plugin Author

    Posted 1 year ago #

  3. LikeBtn
    Member
    Plugin Author

    Posted 1 year ago #

    Hope it was helpful.

  4. The Three
    Member
    Posted 1 year ago #

    Yes! That I was looking for... Thanks

  5. ALBCODERS
    Member
    Posted 9 months ago #

    Hi Likebtn I want to add your plugin on all my themes
    I downloaded it yesterday and started to remove my old and simple rating system.

    But I see that all codes not working for me
    For example I want to add the number of likes in index.php

    <div class="likearea">
                               <?php $post_custom = get_post_custom( get_the_ID() ); ?>
                                <a href="<?php the_permalink() ?>" class="views"><?php echo getPostViews(get_the_ID()); ?></a>
                                <a href="<?php the_permalink() ?>" class="like"><?php echo (int)$post_custom['Likes'][0]; ?></a>
                                <a href="<?php the_permalink() ?>" class="dislike"><?php echo (int)$post_custom['Dislikes'][0]; ?></a>
                            </div>

    <?php likebtn_post(); ?> is not working but I got it using <?php echo do_shortcode('[likebtn]'); ?> but thisone gets only default style.

  6. ALBCODERS
    Member
    Posted 9 months ago #

    I tried this too.

    <div class="likearea">
                            <?php $postid = get_the_ID(); ?>
                            <a href="<?php the_permalink() ?>" class="views"><?php echo getPostViews(get_the_ID()); ?></a>
                                <a href="<?php the_permalink() ?>" class="like"><?php echo (int)$postid['Likes'][0]; ?></a>
                                <a href="<?php the_permalink() ?>" class="dislike"><?php echo (int)$postid['Dislikes'][0]; ?></a>
                            </div>

    But not worked

  7. LikeBtn
    Member
    Plugin Author

    Posted 9 months ago #

    Have you enabled the plugin and configured synchronization?

    Also see http://likebtn.com/en/faq#statistics_not_working

  8. ALBCODERS
    Member
    Posted 9 months ago #

    To enable statistics...
        Upgrade your website to PRO or higher plan on LikeBtn.com.
        Set your website tariff plan in Settings.
        Enter E-mail and API key in Settings.
        Set Synchronization interval in Settings.

    Anyway thankyou...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Like Button Voting & Rating
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic