WordPress.org

Support

Support » How-To and Troubleshooting » Problem filtering posts and post count

Problem filtering posts and post count

  • I’ve some filters on the_posts, so the users can view only certain posts based on some user metas and some complicated conditions.

    Anyway, when WordPress query for posts, for example on the home page or the search page, it seems like the posts are 1st fetched, truncated to 10 (for example) results, and then, filtered, so, if there’s no post allowed on these 10, no post is shown.

    The desired behavior is, obviously, remove ALL the disallowed posts first and then select 10 results.

    A filter on the_posts does the first case, what will be the workflow for the second?

    Thanks for all

  • The topic ‘Problem filtering posts and post count’ is closed to new replies.
Skip to toolbar