I’ve found the problem, and now I realise I had this exact same problem years ago on a different project:
This:
'exclude_from_search' => true
Needed changing to:
'exclude_from_search' => false
'has_archive' => true,
I don’t get why excluding a post type from search should affect archive templates, but at least it’s fixed now.
Related Posts:
- Check if current term is a child of another term
- How to get a terms and posts associated with another term?
- Exclude 2 in 3 terms of A Taxonomy from all Archives
- Exclude specific slug in ‘get_terms’
- Is there a way to disable a term rather than deleting it?
- Modify Term Update Redirection
- Return only the custom sub-term for custom post type, do not echo term-parent
- get_terms() doesn’t return empty terms even though hide_empty is false
- Formating the_terms() function output
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- Get current term’s ID
- Is it possible to get a Previous/Next Taxonomy term archive URL?
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- How to get the top most term (top ancestor) of a custom taxonomy child term?
- How to set hierarchical terms to a post using wp_set_object_terms
- Echo taxonomy term meta on author.php
- Hierarchical display of custom taxonomy
- Ordering Posts with Custom Taxonomy Terms Array
- List taxonomy / category count showing list published posts only
- How to display term description in empty terms archive?
- Checking if a Page has an Associated Term?
- What are terms and taxonomy, how they related to post and how these three are stored in database?
- Dynamically tax_query terms
- Get terms ordered by post date
- Allow only 1 instance of each term in each custom taxonomy
- get_the_terms() to show all custom taxonomies
- How can I get WP to build a feed based on multiple taxonomy terms
- get_terms: determine if taxonomy term has children
- Get pages only with a specific taxonomy
- display taxonomy slug from term ID
- get_term_children doesn’t return an array of children terms
- Get Current Custom Taxonomy ID by Post ID
- Changing stylesheet depending on custom taxonomy terms
- ‘wp’ action hook not firing in admin and login?
- Use get_the_terms to list subcategories of custom taxonomy
- Get taxonomy parent using child slug (from merged taxonomies)
- get_term and get_term_by return null or false, even though term exists
- Display Taxonomy Terms in an option tag with value being the slug
- Changing taxonomy term by slug (wp_update_term)
- How to add Post Format Taxonomy Archive page in the menu?
- Custom Taxonomy index/archive hierarchy
- Filter custom taxonomy archive posts by 2nd custom taxonomy using select dropdown
- Custom Taxonomy Term Archive Page Template that Filters 2 or more Taxonomies
- How to use multiple archive templates for a taxonomy?
- Displaying Custom Taxonomy without a hyperlink
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- How to group all terms children’s in custom taxonomy?
- Show template part if part of term
- one post per term taxonomy
- How can I change the output display of my pagination?
- Corrupted nav-menu?
- Get name of taxonomies of current page
- Create alphabetical Pagination for custom taxonomy?
- List Top 5 taxonomy terms based on number of post
- Taxonomy archive template that shows posts from more than one taxonomy
- Custom Taxonomy List with Children
- why the archive of custom taxonomy term shows nothing?
- Order taxonomy terms wordpress
- Unable to get the Parent Custom Taxonomy Terms
- How to get the term description in a taxonomy term archive query?
- Unsetting post_tag taxonomy breaks term description for other taxonomies
- Use wp_list_categories to list parent categories from actual term
- Include get_term_link inside search
- Trash Bin for Categories?
- Set two terms for a post when they differ only by an accent
- Add terms to a taxonomy archive from within the same taxonomy
- Retrieve the child terms by having the parent’s information
- add pagination in wordpress page template
- Custom Taxonomies Archive Page 404
- Listing Cities A custom taxonmy by selection order
- Cloning product not copying custom taxonomies
- how do you pull data from two taxonomies?
- How to create a non removable taxonomy term?
- Filter “get_terms” query
- generate random slug when adding taxonomy
- Get Highest and Lowest get_term_meta() value from Taxonomy Term
- Displaying subcategories and then posts in taxonomy template
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- What’s the url queryvar for a taxnomy archive?
- set_object_terms for custom taxonomy in custom post type – not working
- qtranslate-x problem with custom term description
- Resize $term attachment using url
- Creating a Taxonomy Page [duplicate]
- switch statement for taxonomy content
- Display taxonomy term slugs
- How to use tax_query other than by slug or id or solve custom taxonomy tags conflicts with pre-existing tags?
- Tax query array terms display out of order
- Taxonomy term breadcrumb; how?
- Advanced AND tax_query in sidebar with 2 taxonomies
- get_terms() – unexpected ‘=>’ (T_DOUBLE_ARROW) error
- Display woocommerce product_cat child terms with thumbnails
- wp_get_object_terms count on taxonomies within an category archive
- Taxonomies starting with a hyphen (minus) to assign B.C. dates to a post
- How to delete unused terms?
- How do I check if a post has a term with a particular ancestor/parent?
- How Can I Change a Taxonomy URL Based On The Originating URL?
- Rewrite Rule Working for all but one of the taxonomies created
- Dropdown taxonomy lists in admin menu
- How do I get the correct URL?
- Custom order of taxonomy using wp_get_object_terms and woocommerce_term_meta