Admin slow on Postlist (over 30k Posts in Database)

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/

can’t modify post title using the_posts filter

You missed the return statement. function filter_the_posts( $array , $oQuery) { … $array[0]->post_title=”new title”; $array[0]->post_content=”new content”; return $array; } add_filter( ‘the_posts’, ‘filter_the_posts’, 10, 2 );