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 Post Types, Single Posts returning 404 Errors – flushing permalinks does not correct
- Cannot create custom post types with a specific name
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Removing custom post type slug from URL
- How to add rewrite rule to custom post type with parent in url with cpt ui?
- Custom post type as home page with custom url
- Customize Custom Post Type URL
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- Custom post URL 404 error
- Create a custom php page and load it at a specific slug
- Grouping metadatas into one
- URL rewrite add author as base
- Remove CPT name from permalink but add %category% instead
- Single post with a Custom Post Type returns 404, when archives of the CPT work correctly
- Anon function and add_meta_box
- Permalinks /country/city/cpt/postname/
- Custom Permalink to remove category word , keeping posts permalink with date?
- Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types
- Seamless permalinks between Custom Taxonomy and Custom Posts
- Custom post type and custom taxonomy with the same slug using the file page taxonomy only as directory
- Metabox not show in categories custom post type cmb2
- Need help with permalink rewrites for Custom Post Types with hierarchical relationships
- Custom Post Type Permalink empty
- Set a CPT slug as a base name for all the taxonomies
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Change custom post type permalink to show name of post from another custom post type?
- Custom Post Type Permalink
- Repeatable Fields Metabox with Textarea (or wp_editor)
- How to prevent a CPT’s slug and page slug from conflicting with each other?
- How to use TinyMCE Editor for one of my custom post meta field?
- Display correctly using metabox.io
- WordPress randomly shows 404 errors
- Permalinks for custom post type
- Create Connection Between two post types
- How to have this permalink structure: post_type/postname/custom_inner_page
- pre_get_posts for custom page builder meta box
- Additional section in custom post type permalink
- Disable closing on metaboxes
- How to include term custom meta into the custom taxonomy term permalink structure
- Blog posts for custom post type only
- Path to custom post type
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Show Custom Post Type meta boxes only on Page Edit
- Cannot save CPT meta box
- How to make custom taxonomy into drop down select in a custom metabox
- Adding Page Templates to post but it ignored it
- Permalinks: custom post type -> custom taxonomy -> post
- Create a Dropdown from Custom Post Type
- Translating custom post type metaboxes [closed]
- Adding a metabox on a CPT’s submenu page
- CPT’s with landing page instead of archive – Url Rewrite?
- How to change permalink to include custom post type
- Removing Custom Permalink Structure for Custom Post Type
- Custom post type, permalinks, taxonomies and blog posts
- Fixed values for same post translations
- How to Add multiple instance of meta box to custom post type
- Custom post type permalink returns 404
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Use the same date-based permalink structure for all post types
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)