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
- How to get all taxonomies of a post type?
- Efficient Taxonomy Intersection
- Set relationship between custom_post_types
- Remove admin menu for custom taxonomy attached to custom post type
- How do I list custom taxonomy terms without the links?
- Page not found taxonomy custom post type
- How to list custom taxonomy categories?
- clients list using wordpress
- Custom taxonomy query for a custom post type
- Extend walker class with custom post types [closed]
- How to do a custom bookmarks post type?
- Getting taxonomy terms used by custom post type
- How to display Custom Taxonomy of Custom post type
- associate custom post type with tags with specific pages
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Custom Taxonomy breaking pages permalinks
- taxonomy template for custom post type the same as the archive
- Get categories and descriptions from custom post type
- Custom Post Types for Support Ticket plugin?
- Problem with custom post types, taxonomy and permalinks
- Custom post template for particular posts
- Repeating posts when paginating random posts
- Query/list all terms and their custom post count
- Get custom taxonomies from multiple posts
- How can I make a custom post type sticky?
- Get Taxonomy Term Title by it’s URL
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- Group CPT posts by custom taxonomy
- Limit number of custom posts per taxonomy
- Number of Custom Post Types published are not being shown in the custom page
- Load Custom_post_type categories post with ajax
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- How to add and clear custom post types and taxonomies in a plugin? Considerations for existing data
- post_parent in custom post type
- How to check if post/page or taxonomy post is published by admin
- Custom taxonomy or custom page templates?
- Permalink problems with custom post type and custom taxonomy
- Get terms of a post but only if they’re also the child of a specific term
- Custom Post Type Categories URL not displaying posts
- Custom order of Taxonomy Terms
- Custom Post Type Advanced Slug
- tax_query (if the terms are empty)
- Getting only one post per category
- Should putting custom code in functions.php or created the plugins [duplicate]
- Get posts by category name
- List child categories from parent category on custom taxonomy page
- Create a custom taxonomy template that loops through child categories in term order?
- How to implement very unusual wordpress routing structure?
- Loop all post on single.php
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Changing permalink of default Post with custom post
- get_queried_object not work in taxonomy page
- wp_insert_post deleting previous post custom meta
- Change custom post taxonomy values from front-end
- Pages of my taxonomy terms are showing all posts
- custom post type single page
- custom post type single post preview for pending status
- How to create a permalink structure with custom taxonomies and custom post types
- Is there a way to re-order the Custom Taxonomy drop-down on a Custom Post listing page?
- How to get all posts related to a taxonomy?
- Custom post types not displaying per category
- DIVs not showing correctly on CPT?
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Updated from 3.8 to 4.2 and all post types changed to “post”
- Hierarchical taxonomy in permalink structure
- predefined custom field on registration page
- Displaying taxonomy icon outside archive page
- Why won’t this rewrite rule work?
- Custom post type single display is ommited
- Archive.php is not displaying tags
- How to not have the items of the subtaxonomy within the parent taxonomy
- How to save an integer as taxonomy term?
- Sort custom post type items by taxonomy description
- Tags and Taxonomy links not working for Custom Post Types
- Get custom post type parent category
- How can i change url structure of cpt like this?
- Can I have a specific template for products even if they are standard posts and not CPT?