Skip to:

Excluding “Closed” posts, but keeping them visible in archive

  • Indrekkor


    Have a large site with couple of million of posts.

    Our site logic is that posts that havent been replied to in 1 year will be closed and that is the only reason a topic gets closed nothing else.

    Is it possible to remove post_status “closed” from the main query so that the closed ones will be accessible for example “Archive” under pagination and processing closed posts pagination gets done by a different query, not SELECT SQL_CALC_FOUND_ROWS.

    Reason for trying this would be to lessen the amount of rows SELECT SQL_CALC_FOUND_ROWS has to process from 2m to 200 000.

    Ofcourse i know how exclude closed, but how to make “Archive” work with a different query?

  • You must be logged in to reply to this topic.
Skip to toolbar