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
- Get category id from post id of a custom post type
- Custom Taxonomy as Dropdown in admin
- Hide custom post type field from author?
- How to disable a Custom Post Type Feed?
- Permalink for CPT with taxonomy
- How to create custom URLs for Custom Post Type sub sections?
- Custom post type category, taxonomy and URL rewrite problem
- Trying to save custom post type from frontend partially working
- Include both default and Custom Post Type in query modified inside pre_get_posts
- How to use different featured image size for a custom post type?
- Can’t get order_by meta_value_num to work properly
- Is it possible to place custom post type files inside a folder in theme directory?
- How do I get Link for Oldest Custom Post Type (dynamically)
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Archives for Custom Post Types (without Pages)
- Shortcode for display posts in wp-editor
- Insert post metadata for all posts in CPT at once if metadata no existent
- Admin Pointers on a custom post type
- Authenticating user for custom post type [closed]
- Show data from one Custom Post Type in another Custom Post Type
- Custom Post Type single.php template only shows the latest post
- How to integrate single and archive templates for custom post type in any WordPress theme
- Searching post types
- wordpress post_where set only for my costum post type
- Looking to Customize YouTube Video Embeds
- Using page title as a link to term archive
- Pagination on a page
- Display category name of custom posts only once in the loop
- Metaboxes inside Tab
- Virtual page and loading template
- Template for Custom Post for the EDITOR
- WP_Query: how to search tags in addition to a custom post type?
- How to show custom post count in archive page
- How can I prevent the admin to create a new custom post type more than one?
- Custom Taxonomy is disabled on Edit page
- category page template for custom post type
- Delete attachment with post
- Get link for feed of specific post type AND taxonomy
- Need an idea about how to open a popup which contain only post created form in wordpress admin
- Copying custom field value in to title
- Get single object term for custom taxonomy
- Return Custom Post Type Categories
- img src not working correctly in custom post type
- Custom Sort Order for Custom Post Type Taxonomy