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 ); } … Read more

Using post type archive page for taxonomy archive

Have you checked the WordPress Template Hierarchy Diagram To get an idea how wordpress choose the tempalte. I’m not sure but according to the WordPress Template Hierarchy, WordPress will choose default archive.php for custom taxonomy if no special template is specified. That means you cannot not have archive-product.php to use with Custom Taxonomy archive. In … Read more

Category Archive

It’s a little bit hard to choose “best way”, when you give so few details describing your case. There are two most common ways I can think of. Use category description. You can then print it out in category/archive template using category_description. Make custom page template which will display posts from given category (or whatever … Read more