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 remove Filters from post admin page?
- How can i avoid the permalink start with ‘blog’ while using the custom post type?
- remove post-name from title in custom post type
- Sort the main query in subcategories/terms?
- Getting Post ID from slug during init
- Paginate Custom Post Type Page
- Highlight nav menu terms
- Get_post_meta() won’t return value
- multiple search forms and search results
- wp parse_query not working with custom meta value
- How to create another version of the Category widget?
- Child Theme for Mobile Browsers
- Multiple portfolios and single item in two of them (ideas?)
- How can I display my custom posts type in a monthly calendar view?
- Display custom post type category, while in a CPT category, then the posts beneath
- Additional section in custom post type permalink
- Disable closing on metaboxes
- Custom post type Permalinks with hierarchical Taxonomies
- Slug for custom post type
- Display post from a date range from custom field
- Stores category posts in an array
- How to define the template for custom posts?
- Add post type pages with plugin
- Displaying custom post type listing
- Extend Custom Post Type
- Do stuff when editing or writing a certain custom post type?
- Url Rewriting a dynamic wordpress page with parameters
- Display list of Custom Post
- php dynamic content inside shortcode
- Can’t save meta box data in WordPress using custom post types
- Adding Post Title from custom post type to another custom post type
- How to merge 2 custom post type permalinks
- How to use multiple orderby conditions on query search results? (orderby one post type, relevance)
- Adding Custom Post Types to category/tag/author archives breaks header content
- Filtering custom post using Ajax and taxonomies, keep getting 0
- custom post permalink
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Displaying database table in backend of wordpress
- Loops running into each other
- Permalinks Works for Custompost type but not with pages Why?
- Echo post count of CPT with current taxonomy
- Adding Taxonomies to Custom Post Type Without Displaying Blog Post Categories
- how can i call archive-{post type}.php template from my custom plugins to my theams?
- Right Permalink for Custom Post Type with number slug