How do I display main query posts in random order using add_filter

Should be add_action not add_filter when using pre_get_posts add_action( ‘pre_get_posts’, ‘thefunction’); function thefunction($query) { if ( ! is_admin() && $query->is_main_query() ) { // Not a query for an admin page. // It’s the main query for a front end page of your site. // Let’s change the query using arguments. $query->set( ‘orderby’, ‘rand’ ); } … Read more

Posts missing in Dashboard, but are still on blog pages

This could be the result of a plugin or theme incompatibility. Please turn off all plugins and change themes. If that works, start enabling each plugin one by one to find the source. You can also install the Health Check plugin. You can use its troubleshooting to have all plugins disabled and the theme changed … Read more