I have created a custom post type, with its own custom taxonomy:

$productTaxonomyArgs = [
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'show_admin_column' => true,
        'description' => __('Product category', 'byronposttypes'),
        'hierarchical' => true,
        'rewrite' => [
            'slug' => 'collections',
            'with_front' => true,
            'hierarchical' => true,

register_taxonomy('product-categories', 'products', $productTaxonomyArgs);
register_taxonomy_for_object_type('product-categories', 'products');

The problem is, that I need to have 2 static pages that have the slug /collections/lifestyle, and /collections/traditional. These are both terms of the custom taxonomy, and the archive is displayed in preference to the static page. The reason I think these need to be static pages is because the layout is different to the rest of the archive pages.
I'd like to know if this is possible, and if so, how. Thanks in advance!

1 Answer 1


It is not possible. When wordpress is parsing the URL, pages are the lowest priority (or fallback default), which means that anything with the same url that is not a page will "win" over them.

You just need to use the same code you wrote for the template of the page for the archieve. You can use the explanation about file names here to make it very easy to target specific taxonomies or terms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.