Sort posts by likes
-
Hi,
Now that I have this plugin working, I want to sort posts by likes. Found this code in the FAQ: https://likebtn.com/en/wordpress-like-button-plugin#collapsesorting1
…and pasted
<?php query_posts($query_string . '&meta_key=Likes&orderby=meta_value&meta_type=numeric&order=DESC'); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?>…above the loop.
Site the showed the items with the most likes on top, but all the items with no likes yet were no longer visible. Of course we want to show the most liked content on top, but underneath the other content should be visible.
How to achieve that?
Thanks in advance,
Yuri
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Sort posts by likes’ is closed to new replies.