WordPress.org

Ready to get started?Download WordPress

Forums

WTI Like Post
[resolved] Most Liked Posts in PHP - Not Working (4 posts)

  1. markmwdb
    Member
    Posted 1 year ago #

    I've placed the shortcode [most_liked_posts] in my PHP code using the format:
    <?php echo do_shortcode("[most_liked_posts]"); ?>

    However, it keeps saying "No posts liked yet" when there are likes on posts.

    This is not due to the error with excluding posts/pages and enabling the "Show excluded posts/pages on widget" as I have checked that already!

    The shortcode works perfectly when placed on my page. The fact that the plug-in is outputing "No posts liked yet" implies that it is functioning in the PHP.

    If anyone could help it'd be greatly appreciated!

    http://wordpress.org/extend/plugins/wti-like-post/

  2. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    Please include the time attribute as below
    <?php echo do_shortcode("[most_liked_posts time='all']"); ?>

  3. markmwdb
    Member
    Posted 1 year ago #

    Perfect! Thank you very much!

    Is there a way to select how many titles to display?

  4. webtechideas
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, it can be managed. Please refer to the documentation. You can download it here

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic