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
<?php
$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; ?>
-
<p><?php the_title(); ?> </p>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Arrange post order by Likes’ is closed to new replies.