Got it. I had tried to use flush_rewrite_rules()
on plugin activation/deactivation, as so:
function creativeworks_activate() {
// register taxonomies/post types here
flush_rewrite_rules();
}
function creativeworks_deactivate() {
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'creativeworks_activate' );
register_deactivation_hook( __FILE__, 'creativeworks_deactivate' );
…but that didn’t seem to do anything. However, when I changed the site-wide permalink options arbitrarily and saved them, then the rewrite rules were flushed successfully, and my custom post type templates started working again.
Thonks to Milo for pointing me in the right direction.
Related Posts:
- single-{$post_type}-{slug}.php for custom post types
- What is singular.php?
- Custom Post Type Plugin: Where Do I Put The Template?
- CPT Template Not Showing – Getting 404
- Template for specific post of custom post type
- Multiple Single Post templates
- Display Editable Text Above CPT Archive Listings
- Is it possible to have an index page for taxonomy term for each custom post type it is assigned to?
- Custom Post Type with Nested Taxonomy and Template Files
- Archive or taxonomy pages not working for custom post type
- Single page template for custom post_type
- Trying to manage templates on a blog with lots of custom taxonomies
- WordPress Template Hierarchy
- `post_type` => `any` not giving me my custom post
- Rewrite Custom Post Type URL slug
- Custom post type and taxonomy permalinks – Structure
- Help splitting a custom post type archive into “past” and “upcoming”
- Rewrite URL for only archive page (custom post type)
- Custom Taxonomy term archive template
- Custom Post type with ACF in REST API, how do I get those values?
- Custom post type not using it’s own single-postname.php
- Include custom post type single template, but respect theme override of template if it exists
- Hook to override title, image and content
- Custom post type templating problem
- Custom post type showing index.php
- redirect automatic page that serves custom posttype content
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- WordPress Doesn’t Generate Taxonomy Archive
- CPT Template Not Showing – Getting 404
- Warning after create Custom post type with Roots theme
- Custom Empty Results page for my Custom Post Type
- Custom Post Type Template Hierarchy – Single post template
- Templates for hierarchical custom post type
- Custom Post Type homepage template
- Getting custom taxonomy posts on archive page
- Custom post types templates
- Archive page of taxonomy returns a 404 error
- Templating advice sub posts of a CTP
- custom post template not getting picked for posts with Unicode title
- Specific template for subcategory of custom taxomy
- How do I control what template is shown based upon Taxonomy Term?
- taxonomy – templates are not loading
- Templates for CPT not working
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- Single taxonomy for different custom post types
- Different taxonomy.php for different custom post types
- Get posts in same category not working
- Custom Homepage As Single Page or Custom Post Type?
- URL Rewrite Adjustment for Custom Post Type causes template to revert to index.php
- Custom post type category page not working
- CPT Template Not Showing – Getting 404
- Roots: Custom Post Type 404 Not Found [duplicate]
- List a custom taxonomy’s terms, with links, on the taxonomy page
- CPT Template Not Showing – Getting 404
- How can I sort posts ascending by post title for a specific post type, but on a category archive template?
- Custom taxonomy meta fields
- How to assign a single-menu-template to a menu-items in a taxony/ cat/ subcat/ subcat-item
- How do test if a post is a custom post type?
- Where to put my code: plugin or functions.php?
- What does this PHP function code mean? [closed]
- Remove slug from custom post type post URLs
- How to disable the single view for a custom post type?
- Custom post types, taxonomies, and permalinks
- Query all posts where a meta key does not exist
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- How to get all taxonomies of a post type?
- How to sort the admin area of a WordPress custom post type by a custom field
- How to create a custom search for custom post type?
- Deregister custom post types
- Can I assign a template to a custom post type?
- Permalinks: custom post type -> custom taxonomy -> post
- Should I use custom post types or a custom database tables for plugin development?
- Enable revisions for custom post type
- Extending the search context in the admin list post screen
- How do I query a custom post type with a custom taxonomy?
- Adding a Custom Post Type into the menu screen
- Pagination not working with custom loop
- How to Add Tags to Custom Post Type?
- How come Featured Image isn’t showing up in my Custom Post Type?
- Custom Post Type URL Rewriting?
- Add category base to url in custom post type/taxonomy
- Include custom taxonomy term in search
- Is It Possible To Add Custom Post Type Menu As Another Custom Post Type Sub Menu
- Adding ‘menu order’ column to custom post type admin screen
- Capabilities and Custom Post Types
- Can the Next/Prev Post links be ordered by menu order or by a meta key?
- what is the correct way to compare dates in a WP query_posts meta_query
- Use register_post_type() to modify an existing post type
- Custom Taxonomy specific to a Custom Post type
- Renaming Custom Post Types and Taxonomies
- List all posts in custom post type by taxonomy
- Redeclare/Change Slug of a Plugin’s Custom Post Type
- Allow member to have access to custom post type only. Permission to only edit their own posts
- Mixing custom post type and taxonomy rewrite structures?
- Advanced search form with filters for custom taxonomies and custom fields
- Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure?
- Resolve a custom post type name vs. page permalink conflict (same slug)
- Get custom post_type’s archive URL
- Enable Gutenberg on custom post type
- Is there a way to get N number of WYSIWYG editors in a custom post type?