we have a Site with around 20k Posts in the normal postlist and another 10k in other CPT. The custom post types work really fast, but the normal Post List doesn't. I assume that might be because the server aggregates how many posts are published, how many are mine and how many are deleted, but I'm not really sure about that.

Any idea how to limit what is being queried - I looked in google how to remove sections from the query but all I find is css "hacks" to not display the filters, not how to remove them from the query.

if you have any other ideas, please let me know.

  • While this is probably too specific for this site since it is not a general WP issue - have you tried using a plugin like wordpress.org/plugins/query-monitor to identify what is actually slow?
    – kraftner
    May 3 at 7:57
  • Yes, I have, and it is not the query itself - I assume because the normal Post List has so many segmentations to count it's the number of queries. So I want to reduce that. The Custom Posttype works fine, so I don't really understand what it is. May 3 at 8:05
  • How many posts are set to display in one page in Screen Options?
    – Abhik
    May 4 at 5:05
  • "it is not the query itself" - then what is it? Are you sure you shouldn't be showing some code here?
    – vancoder
    May 12 at 16:42

1 Answer 1


Perhaps this filter can help you to modify the query for the specific post type and inside wp-admin

as per the documentation, this filter is called before the query is executed so you can modify/optimize the query with the help of this filter.

do_action_ref_array( 'pre_get_posts', WP_Query $query )

further reference: https://developer.wordpress.org/reference/hooks/pre_get_posts/

  • Perfect, thank you! I will try out what it is and then get back here May 3 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.