in your code:
$labels = array(
'name' => _x( 'Locations', 'info_locaiton' ),
'singular_name' => _x( 'Location', 'info_location' )
);
use this:
$labels = array(
'name' => _x( 'Locations', 'info_location' ),
'singular_name' => _x( 'Location', 'info_location' )
);
In $labels variable name array value has different slug. I think this can be a problem.
So, you can correct it and check. Or you can use custom post type plugin to make custom post type easily.
Hope this will help!
Related Posts:
- single-{$post_type}-{slug}.php for custom post types
- Template for specific post of custom post type
- Multiple Single Post templates
- Custom Post Type with Nested Taxonomy and Template Files
- Custom page type – template under page attributes?
- Single page template for custom post_type
- Trying to manage templates on a blog with lots of custom taxonomies
- WordPress Template Hierarchy
- Include custom post type single template, but respect theme override of template if it exists
- WordPress Doesn’t Generate Taxonomy Archive
- Custom Empty Results page for my Custom Post Type
- Templates for hierarchical custom post type
- Custom Post Type homepage template
- Templating advice sub posts of a CTP
- taxonomy – templates are not loading
- Templates for CPT not working
- Single taxonomy for different custom post types
- Custom Homepage As Single Page or Custom Post Type?
- tag.php doesn’t work with tags on a custom post type post?
- Assign single template to multiple custom post types?
- Add Content to Page without shortcodes
- Display Editable Text Above CPT Archive Listings
- Custom taxonomy query for a custom post type
- Need some templating advice for templating with custom post types and taxonomies
- Template tags to display custom post type posts in category template?
- How do I create new content pages for my Custom Post Type?
- custom post type archive template per custom taxonomy term
- Display posts of child category in template
- custom taxonomy – Template not working
- Archive or taxonomy pages not working for custom post type
- Create separate template for shared custom taxonomy with shared terms
- Custom Post Type Templates?
- wordpress 3.4 template files in subdirectories
- Lock post meta block at the bottom of a custom post type
- How do I provide a “show all posts” link in a paginated term archive?
- Rewrite Custom Post Type URL slug
- I am trying to output portfolio items with a picture. This code doesn’t seem to be working. What am I doing wrong?
- Help with CPT template pagination
- How can I force custom post type to use a specific template?
- Help splitting a custom post type archive into “past” and “upcoming”
- Merge multiple custom post types in a single archive template
- Trying to edit the single page from a Custom Post
- Plugin templates in which directory
- WordPress Ignoring My Custom Post Type Templates?
- Using wordpress template tags within an array
- Custom post type not using custom template
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown
- How to clone the “Projects” Custom Post type in Divi theme
- Add Standard Page Attributes Metabox for Page Parent
- Create template for taxonomy results limited by Custom Post Type
- 2 Templates 1 custom post type according url
- How to use custom template files in deeper directory?
- Migrating a taxonomy’s tags to the native category
- How can I get this request to use the Custom Post Type page template instead?
- Add a custom meta box for client to order CPT posts how they want
- Custom posts template page
- How can I use archive-{post_type}.php theme template?
- Add Previous/Next Buttons to CPT Single Pages Only
- How do I assign a block template (.html) to a custom post type?
- Custom Post Type setup
- Apply template by path/slug related to custom post type?
- How to get the current category with custom posts
- Getting custom taxonomy posts on archive page
- WP not recognizing custom post type / template
- Create a custom taxonomy template that loops through child categories in term order?
- Display Posts Query with IF function
- My template won’t apply, theme still fallback to index.php
- Set generic reservation form for custom post type
- One Custom Post Type two different Templates
- handling templates and widgets for custom content types
- On click some element i want to use some template
- Post template with breadcrumb needs to show page navigated from
- Remove Header and style.css from Specific Post template
- Accessing download link from the loop with WP Download Manager Pro
- Warning , Use of undefined constant PLUGIN_PATH?
- custom post template not getting picked for posts with Unicode title
- How do I control what template is shown based upon Taxonomy Term?
- Custom taxonomy template for custom fields loop [closed]
- How to Create a Default Fixed Custom Posts layout for text and images
- Why did permalinks setting affect the pages?
- How to make a custom search template for custom taxonomy?
- Custom post type with two templates
- Custom Post Type tag taxonomy “Page Not Found”
- DIVs not showing correctly on CPT?
- Why isn’t my custom post type using the corresponding custom post template?
- Load different template for CPT (in loop) in my plugin?
- Search page for custom post type
- Custom post type category page not working
- CPT Template Not Showing – Getting 404
- Custom Post Type Template based on Taxonomy
- Template with Custom Post Type (Custom Tables) does not work
- How can I sort posts ascending by post title for a specific post type, but on a category archive template?
- Specifying Default Template for Hierarchal Custom Post Type [duplicate]
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- how to pass args for archive.php query?
- Navigation links to posts in current term shortcode
- CPT Template Option to Top
- Show my custom post id if a country or ip
- How to create custom page templates with default page layout framework?
- How can I produce multiple webpages with a different output based on one entry/Page/custom Page?