Rewrite rules and query for virtual page
You can create a posts archive by just setting post_type=post in your rewrite rule: function custom_archive_rule() { add_rewrite_rule( ‘custom-archive/?’, ‘index.php?post_type=post’, ‘top’ ); } add_action( ‘init’, ‘custom_archive_rule’ ); WordPress will identify this as is_home, so you’ll have to target it in pre_get_posts by the existence of your extra query variables. function custom_arcive_tax( $query ) { if … Read more