There are many small problems with this code (see my comments below):
function gt_custom_post_type() {
register_post_type('project',
array(
'rewrite' => array('slug' => 'projects'),
'labels' => array(
'name' => 'Projects', // <- missing comma
'singular_name' => 'Project',
'add_new_item' => 'Add New Project',
'edit_item' => 'Edit Project'
),
'menu-icon' => 'dashicons-media-document',
'public' => true,
'has_archive' => true,
'supports' => array(
'title', 'thumbnail', 'editor', 'excerpt', 'comments' // <- thumbnail not thumnail
)
)
);
}
add_action('init', 'gt_custom_post_type');
Also you’re lacking any internationalization in there…
Related Posts:
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- Get custom post type slug for an archive page
- Get The Post Type A Taxonomy Is Attached To
- Custom Post type & Taxonomy URL structure
- Custom Post Type as Page parent
- Custom Post Type – Taxonomy Dropdown Menu?
- How to add multiple images to custom post type?
- Set custom upload path for custom post type only?
- category__in not working on custom post type
- Creating a Custom Post Types dropdown in a Meta Box
- How I check if the same post slug has not been used before publishing?
- User roles – enable custom posts disable posts
- WordPress Admin Panel search posts with custom post meta values along with title
- WordPress Gutenberg-Block with ESNext (withState, withSelect)
- Date query for a custom meta field
- Registered Post Type Isn’t Showing in Admin Menu
- Multiple templates for custom post type
- Importing posts in custom post type into new website
- Timepicker-addon doesn’t show – Datepicker works fine?
- Registration and Custom Post Types – How to synchronize information?
- Check if author or current user has posts published
- different template for first and second level custom post page
- Query for multiple post types does not work
- Link users to a custom post type
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- How To Create A Custom Taxonomy 404 Page
- How to enable shortcodes in a custom post type?
- Ajax Check Post Status
- Overriding taxonomy and custom post type
- Custom post types and tag archive pages/permalink structure issue
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- WordPress Custom Post Type Children Template
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Multiple level category drop-down from the WordPress dashboard
- Update Post Meta for a logged in user
- Problem querying Custom post type by custom fields
- How to display Custom Taxonomy under Custom Admin Menu?
- How to order WP_Query by parent for hierarchical Custom Post Type?
- redirect automatic page that serves custom posttype content
- How To Show All Custom Post Types In A Category Instead Of Pagination?
- Is it possible to use have_posts function to list custom post type posts inside a category?
- Assign External Database Queries to Global Variables and Make Them Accessible
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- Searching Custom Fields
- Custom taxonomy and post type with same slug
- Changed permalink structure of CPT – should I redirect?
- How can I display the parts of custom posts?
- How to get all Custom Post Type Filtered by one Specific Taxonomy Term
- Why are previous_post_link/next_post_link skipping some posts?
- Gravity forms how to display list of submitters on the post submitted page [closed]
- How can I display a drop-down select of Post Names
- Hide Status Option From WordPress Publish Metabox and Rename Published on:
- I am trying to get cutom post cout by month of current taxonmy term
- How to create custom search result page with custom URL parameters for custom post type?
- Post Query not working
- Filtering custom posts by custom fields (ACF) [closed]
- add custom tags for custom post type in wordpress
- Custom rewrite rules for /pastissues/%category%-%postname%.html
- If/Else child list for Custom Post Type single template within loop?
- List of all posts in one custom post type in the edit screen of another
- Display custom-post type based on the Title matching the current selected value
- Filter search posts by post meta?
- Problem with customize page cached in WordPress.com [closed]
- Is it a connection or relationship between 2 custom post types?
- Featured image not appearing
- Custom front-end form for adding post – Category problem
- i want to send email to user when the custom taxonomy is changed
- Faking “Same Slug Root, Multiple Custom Post Types” with Redirects?
- Issues with static pages redirecting towards home.php
- How to apply multiple rewrite_rule to a single custom post type url?
- Store a value in global scope after init hook is fired
- Boostrap Sliser convert into wordpress
- Attaching more than 1 parent (Post) to a media file
- custom post types – overwrite function in parent theme function.php via child theme
- Custom post type single page returning 404 error when sharing archive url with custom taxonomy
- Query first and last name from custom post type
- Custom Post types categories are creating additional page indexes but pointing to the same archive
- WP Query filter search. Result show all posts instead just custom post type
- Subpage with custom post types inside another cpt
- Custom Post Type single post type shown in theme single.php
- Order posts by meta value hiding posts instead of re-ordering
- Change the url of a custom post type to include taxonomy
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- call_user_func_array() error after moving to another server
- Custom post type issue
- add current-menu-item to multiple custom post types
- How to create a custom template for this custom post type?
- How to query posts by meta keys AND under specific category?
- Query Posts with Custom Taxonomy from a Custom Post Type
- Custom post type navigation on static page
- Add multiple custom meta boxes to different custom post types
- how to load custom single.php?
- How to show a custom taxonomy using a custom template
- I want to split this into two functions
- Register a title automatically with a relationship field
- Change position of Post Formats box?
- Add HTML before a specific div?
- Custom Form Data save after Login User
- Woocommerce product page is not showing custom css [closed]
- Post object GUID adding http:/