according to your code, your cpt is “event”. You will either need to change the your php to single-event.php or change this line:
register_post_type('event', $args);
to
register_post_type('events', $args);
Usually they are the plural so the 2nd option is a better choice. With that being said, I always recommend adding namespace to avoid conflicts. Especially in this case because many people have event CPTs.
Try “shc-events” or something like that to make it your own.
Related Posts:
- Custom post type single-{custom}.php not working
- Disable single pages and archives and keep preview
- How to check the terms in single custom post type template
- Single Template that can be applied only via URL
- How do I display tags for a custom post type single page?
- Limit amount of posts made within a custom taxonomy
- Not Able To Render Single-CustomPostType.php File
- Get term name without a foreach loop
- How to Set Taxonomy Object Description?
- Remove taxonomies using register_post_type_args
- Add filter to Admin list for all custom post types by their custom taxonomies
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- get_the_terms child terms for current post/custom post only
- Custom post type single with custom URL structure
- Shortcode in excerpt
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- Custom post type post_type_link gives “page not found” on any other custom post type
- Post types showing tables…Can I do that?
- Display Taxonomy Term for CPT on single-CPT.php
- How to display category wise posts on seprarate template
- Pulling in Related Posts based on Post Type array
- Post format alternative?
- WP_Query orderby and tax_query
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- browse by category and tags?
- permalink /category/post-name with custom post type and taxonomy
- Taxonomy structure help
- Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Custom Taxonomy not being saved on custom posttype
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- Displaying Custom Taxonomies From Multiple Custom Post Types
- Hierarchial Custom Post Types/Taxonomies
- Custom post type and taxonomy permalinks
- How do I share categories across multiple post types?
- Exclude custom taxonomy term posts from custom post loop
- Hierarchical permalinks for custom post type and taxonomy
- Migrating a taxonomy’s tags to the native category
- Add term to custom post type on draft
- Multiple tag cloud filtering
- List of Posts and Categories
- Grouping of CPTs and taxonomies into menu groups in admin
- Best way to organize book-page structure
- Get url.com/post_type/taxonomy/term work!
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- Invalid argument supplied in register_taxonomy $args->taxonomies
- set permalink for CPT
- Top Level pages in wordpress giving 404, but child pages working fine
- Sitemap generation
- Plugin fatal error
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy/Custom post type structure suggestion on a movie site
- Search by tag name and category
- Taxonomy in URL
- Ordering values entered in Custom Taxonomies
- Listing all term items alphabetically / sorting loop
- How to produce a sub-page-system in WordPress
- Change the Custom Taxonomy URL Slug pattern
- Advanced search form with filters for custom taxonomies
- Custom taxonomy and post type with same slug
- Losing Nav Active State in Menu
- WordPress custom taxonomy template not working
- dropdowboxes with pre-selected custom fields optios that filters the results according seach needs
- Listing custom terms in custom post meta
- Show fields based on taxonomy selection in editor
- Display related custom taxonomy posts in sidebar
- WordPress subpages to custom post types
- Different rewrite rules for taxonomies and cp in multisite?
- Permalinks: custom structure for taxonomy – tags?
- count results in search page based on custom category
- Custom permalink with child taxonomy terms
- Assign Custom post to Custom Taxonomy
- Custom post type Permalinks with hierarchical Taxonomies
- Display Registered Taxonomies
- How can I get this request to use the Custom Post Type page template instead?
- Include custom taxonomy term in search
- Show custom post type inside a custom post type
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Display and register custom categories for custom post types
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link
- Retrieve custom post types by custom taxonomies with WP_Query
- Custom Post type category pages template and loop
- Archive for a Taxonomy of a Custom Post type
- Three Most Recent Posts, One Per Term
- Check if post has specific tag_ID in custom post type
- How to get WordPress term attached to the Post?
- Query posts with double taxonomy
- Custom Post Archive is not working
- Custom post type pagination 404
- get_the_title() is returning results from previous loop
- Why cant I add a custom post type to a custom taxonomy?
- Show Custom Taxonomy title in loop
- Single page not working for custom post type
- WP the_posts() on single-cars.php get category link
- Is it possible to filter the display name for post formats for display in the Formats meta box?
- tax_query not working in template