Okay, I was overthinking this by a mile, because it didn’t occur to me that WordPress automatically generates archive pages for custom post types if you set “has archive” to “true” when you’re registering post types.
What Wound Up Working
I created customized archive-{slug}.php
templates in my theme files for the “brands”, “careers”, and “news” custom post types that I had registered. Once that was done, I uploaded my theme and added the permalink (which WordPress automatically generates for each archive page) to my navigation menu via the custom link option. This resulted in a page with the correct url www.example.com/news/
, posts with the correct url www.example.com/news/example-news-custom-post
, and breadcrumbs that say “News” before the post title, with the correct URL.
Related Posts:
- Getting hierarchical custom post type permalinks to work just like pages
- Custom post type 404s with rewriting even after resetting permalinks
- 404 on child page when parent page slug is identical to custom post type
- Hierachical Custom post types permalinks not working
- Remove Slug from Custom Post Type results in 404
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- custom post type and custom taxonomy url conflict
- Bizarre Permalinks Issue: 404 Errors Everywhere
- Custom taxonomy in URL showing 404
- Help with Elementor Pagination CPT archive 404 problem
- Using taxonomy term in CPT permalink – Pages 404’s
- Custom post type archive pagination 404
- Custom post type permalink tag 404
- Hierarchical permalinks for custom post type and taxonomy
- 404 in custom post type feed with mistake permalink
- How to solve this custom post type goes to 404 page?
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- One Custom post type 404’s others don’t
- Custom post type permalink returns 404 when set to private
- Custom post type slug 404
- How to filter a custom post type by custom taxonomy without 404
- Post type Permalink
- Adding an extra parameter [string] to my posts’ permalink?
- Query Custom Posts – Add To Selection
- Permalink Trouble with custom post types
- Permalinks not working (404) for the ‘item’ post type
- Safe to throw 404 error in request filter?
- One Custom Post Type two different Templates
- Custom Post Type Child Won’t Come Through With Pretty Permalinks
- Custom post shows 404 after theme change
- How can I get custom post types to recognize pretty permalink variables?
- Enabling hierarchical in a Custom Post Type gives error 404
- Standard Page Child of CPT Not Found (404)
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- Metabox messes up permalink
- How to retrieve custom post type permalink in another cpt?
- Custom post type – permalink
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Custom Post Type, 404 error
- Custom Taxonomy as checkbox or dropdown
- How to remove /blog/ prefix for custom post types in permalinks?
- Why won’t my metabox data save?
- Change slug of registered custom post type in child theme
- Templates for Custom Post Types and Custom Taxonomies
- echo value from ‘select’ field type into page template using cmb2?
- WP_List_Table Inside Metabox Not Working on Submit
- Add metabox with media uploader in a custom post type [duplicate]
- wp_generate_attachment_metadata gives me an empty array
- Custom permalinks
- Add links to post categories and taxonomies in wysiwyg link modal?
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Custom Post Type Works but Still Shows “Page Not Found”
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Custom post type category, taxonomy and URL rewrite problem
- Rewrite on custom post type permalink not working?
- Possible to add meta box to edit.php pages?
- Custom Taxonomy Breadcrumb Navigation
- Remove “-2” from a Toolset Types URL with the same post name
- Custom Post Type with metaboxes (no content) only?
- Unable to show meta box data in frontend
- Permalinks not working for custom taxonomy on custom post type
- Does WordPress consider a post name unique if that same post name is in multiple Post Types?
- Custom post type as home page with custom url
- Custom post URL 404 error
- WordPress randomly shows 404 errors
- Adding Page Templates to post but it ignored it
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- custom post type metaboxes not saving
- Custom post type, have only my meta boxes
- Display Repeatable Meta Box Content
- Saving Meta Data within Custom Post Type
- Reusable metabox backend and frontend
- Custom Post Type with Configurable Sidebar via ACF
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Meta box data not saving
- Improve Custom Post Permalink Structure
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- Problem with custom loop navigation inside the blog page
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Error 404 change permalink term custom term taxonomy
- Show a custom post title in another custom post type in Meta box
- Sudden 404 pages on product category archives
- Custom post type defaults to index.php for archive page
- PHP Warning with Custom Fields
- Custom taxonomy with custom post type archive page
- Adding categories to custom post type in permalink
- Custom post type archive false is not compatible with breadcrumbs
- Wrong post ID in meta box callback
- 404 custom post type
- Custom post URLs
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Get post id of permalink for a specific custom post type?
- URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php
- Select custom post by meta value
- Add taxonomy to custom post type archive
- WP_Query arguments: Loop through custom post type – get all entries except excluded meta_key?
- How to query custom post then display sections by meta value
- How do I paginate a custom post type listing on a custom template page?
- Just the First Metabox what saves the data!