how to pass args for archive.php query?
The pre_get_posts hook can be used to modify queries before they’re run. You can use $query->set() to set arguments on the WP_Query object, and $query->is_main_query() in the callback to limit your changes to the main query: add_action( ‘pre_get_posts’, function( $query ) { if ( ! is_admin() && $query->is_main_query() ) { $query->set( ‘posts_per_page’, 12 ); } …