Support » Plugin: WTI Like Post » Arrange post order by Likes

  • Hi there, I want to arrange the post by likes count.
    so that the number 1 will be the most liked and goes in descending order with most unliked at the bottom.

    here is my simple code for my CPT recipie
    $args = array(
    ‘post_type’ => ‘recipie’,
    $recipie_posts = new WP_Query( $args );

    <ul class=”recipie”>
    <?php while ( have_posts() ): the_post(); ?>

  • <p><?php the_title(); ?> </p>
    <?php GetWtiLikePost()?>
  • <?php endwhile; ?>

Viewing 1 replies (of 1 total)
  • Plugin Author webtechideas


    The above code won’t work as the free doesn’t store counts in meta data. So either you’ll have to use a standard query or the pro version which stores counts in terms of post meta. There you’ll also get a template file which has the query that you can use as per your need.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.