So I’m using wordpress with a updownupdown plugin (plugin for upvoting/downvoting posts). What I am trying to do is to show post with ,let’s say at least 10 upvotes, on the homepage and hide the post with not enough points.
I tried to us this code in index.php
if (have_posts()) :
while (have_posts()) : the_post();
if (up_down_post_votesscore( get_the_ID()) > 10){
//content
}
endwhile;
endif;
and it kind of works, it hides all the post with less than 10 upvotes, but it doesn’t put all the qualifying posts in one page (homepage has a pagination), so let’s say there is 2 pages with 5 posts and there is 2 posts in each page with needed amount of upvotes, so instead of putting those 4 posts in one page, it shows only 2 qualifying post in each page.
Sounds like your posts retrieval is limited. You may want to change how many posts are obtained using:
reference: http://codex.wordpress.org/Function_Reference/query_posts
or do something like this if you’re using
get_posts
:Reference: http://codex.wordpress.org/Template_Tags/get_posts