WordPress.org

Ready to get started?Download WordPress

Forums

Problem filtering posts and post count (1 post)

  1. rubentrf
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic