{"id":4545,"date":"2018-06-14T14:47:00","date_gmt":"2018-06-14T14:47:00","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2018\/06\/14\/how-to-make-a-custom-post-type\/"},"modified":"2021-06-07T17:00:37","modified_gmt":"2021-06-07T21:00:37","slug":"how-to-make-a-custom-post-type","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/","title":{"rendered":"How to Make a Custom Post Type"},"content":{"rendered":"<p>Adding custom post types to WordPress is a great way to add custom features in a safe way.\u00a0 For example, you could add <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/the-add-action-wordpress-function\/\">estimated reading time<\/a> to a custom post type without affecting the default post type.\u00a0 In this article, we&#8217;re going to introduce you to <strong>WordPress custom post types<\/strong> and show you how you can make your own. First, we&#8217;ll discuss what a custom post type is, and then we will use a plugin to create one.<\/p>\n<h2 id=\"orgfccb194\">What are Custom Post Types?<\/h2>\n<p>By default, your WordPress site has three post types:<\/p>\n<ul class=\"org-ul\">\n<li>Pages<\/li>\n<li>Posts<\/li>\n<li>Media<\/li>\n<\/ul>\n<p>At the core level, all of the above are considered &#8220;posts&#8221;, but they each <i>behave<\/i> differently. WordPress uses <i>templates<\/i> in the theme to display these types of content differently. That&#8217;s why they&#8217;re known as post <i>types<\/i>.<\/p>\n<p>For example, most themes will display a comment form on the <i>Posts<\/i> post type but not on the <i>Pages<\/i> or <i>Media<\/i> post types.<\/p>\n<p><i>Custom post types<\/i> are user-created post types that can be totally unique to your site. For example, you could create custom post types for books, movies, or a diary, without affecting your regular Posts or Pages post types.<\/p>\n<p>You can create as many custom post types as you want. But, in this case, less is more. Having too many custom post types can make your site difficult to use.<\/p>\n<h2 id=\"org854345f\">How to Create Custom Post Types<\/h2>\n<p>In this guide, we&#8217;re going to be using the <a href=\"https:\/\/wordpress.org\/plugins\/custom-post-type-ui\/\">Custom Post Type UI<\/a> plugin to create our custom post types.<\/p>\n<div class=\"alert alert-warning\" role=\"alert\">Before proceeding you will just need to install the <em>Custom Post Type UI<\/em> plugin. If you&#8217;re unsure of how to install WordPress plugins, you are advised to go back and read our full guide on <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/install-wordpress-plugins\/\">how to install a plugin using the plugin search<\/a> right from your WordPress Dashboard.<\/div>\n<p>Here are the basic steps:<\/p>\n<ol class=\"article_list\">\n<li>Hover over <b>CPT UI<\/b><\/li>\n<li>Click <b>Add\/Edit Post Types<\/b><\/li>\n<li>Fill in the fields<\/li>\n<li>Click <b>Add Post Type<\/b> at the bottom<\/li>\n<\/ol>\n<p>Once you have installed Custom Post Type UI, you will see a button labeled <b>CPT UI<\/b> appear in the left panel of your WordPress Dashboard. Hover over this button to reveal the menu and click <b>Add\/Edit Post Types<\/b>.<\/p>\n<p>From there, you will be redirected to the main Add\/Edit page. Under the first tab, you will fill in many fields to make your post type. These may seem overwhelming at first, but they&#8217;re mostly just labels for the WordPress user interface. These will make it easier for you (and any other users) to create content with your post type.<\/p>\n<p>Start with the basic settings and work your way down through the labels. Each field comes with an explanation and example content\u2014where appropriate.<\/p>\n<p>Once you have filled in the fields, be sure to scroll down and click <b>Add Post Type<\/b>.<\/p>\n<h2 id=\"org92746db\">Some Important Settings<\/h2>\n<p>There are so many settings for your custom post type that you may feel overwhelmed. In this table, we&#8217;ll share some of the most important features you should use right away.<\/p>\n<table border=\"2\" frame=\"hsides\" rules=\"groups\" cellspacing=\"0\" cellpadding=\"6\">\n<thead>\n<tr>\n<th class=\"org-left\" scope=\"col\">Name<\/th>\n<th class=\"org-left\" scope=\"col\">Setting<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"org-left\">Post Type Slug<\/td>\n<td class=\"org-left\">Similar to the permalink, the slug appears in the URL structure for this post type<\/td>\n<\/tr>\n<tr>\n<td class=\"org-left\">Has Archive<\/td>\n<td class=\"org-left\">If true, your post slug will be used to display an archive of posts for this post type<\/td>\n<\/tr>\n<tr>\n<td class=\"org-left\">Menu Icon<\/td>\n<td class=\"org-left\">A unique icon selection will help distinguish your custom post type from the others, or you can use the default. Pick out any icon from the <a href=\"https:\/\/developer.wordpress.org\/resource\/dashicons\/#admin-site\">WordPress dashicons<\/a>, or upload your own 20px by 20px image.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"org12eb2a6\">How to Use a Dashicon for a Menu Icon<\/h3>\n<p>All of the items in your WordPress admin menu (on the left side of the Dashboard) have a custom icon next to their name. You can assign one of these to your custom post type by copying and pasting the <i>Dashicon class name<\/i> in the CPT UI field labeled <em>Menu Icon.<\/em><\/p>\n<p>You can find the dashicon class name listed to the right of the icon on <a href=\"https:\/\/developer.wordpress.org\/resource\/dashicons\/\">WordPress.org<\/a>.<\/p>\n<p>Examples of Dashicons:<\/p>\n<ul class=\"org-ul\">\n<li>dashicons-admin-site<\/li>\n<li>dashicons-admin-appearance<\/li>\n<li>dashicons-editor-help<\/li>\n<\/ul>\n<p>Paste one of the above class names into the Menu Icon field in the CPT UI settings, and you will notice, when saved, your custom post type will have a custom Menu Icon.<\/p>\n<p>Note: You can also use a custom image, but you are advised to keep the dimensions to 20px by 20px or fewer.<\/p>\n<h2 id=\"org6392a2f\">Your Post Type is Ready<\/h2>\n<p>You can now write new posts with your custom post type! If you have any questions or comments about this procedure be sure to leave us a comment below. We always appreciate the feedback.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding custom post types to WordPress is a great way to add custom features in a safe way.\u00a0 For example, you could add estimated reading time to a custom post type without affecting the default post type.\u00a0 In this article, we&#8217;re going to introduce you to WordPress custom post types and show you how you<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\"> Read More ><\/a><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[56],"tags":[],"class_list":["post-4545","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Make a Custom Post Type | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this article, we are going to create custom post types in WordPress.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make a Custom Post Type | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this article, we are going to create custom post types in WordPress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-14T14:47:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-07T21:00:37+00:00\" \/>\n<meta name=\"author\" content=\"Christopher Maiorana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Maiorana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\"},\"author\":{\"name\":\"Christopher Maiorana\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\"},\"headline\":\"How to Make a Custom Post Type\",\"datePublished\":\"2018-06-14T14:47:00+00:00\",\"dateModified\":\"2021-06-07T21:00:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\"},\"wordCount\":768,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"WordPress Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\",\"name\":\"How to Make a Custom Post Type | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2018-06-14T14:47:00+00:00\",\"dateModified\":\"2021-06-07T21:00:37+00:00\",\"description\":\"In this article, we are going to create custom post types in WordPress.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Make a Custom Post Type\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\",\"name\":\"Christopher Maiorana\",\"description\":\"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Make a Custom Post Type | InMotion Hosting","description":"In this article, we are going to create custom post types in WordPress.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/","og_locale":"en_US","og_type":"article","og_title":"How to Make a Custom Post Type | InMotion Hosting","og_description":"In this article, we are going to create custom post types in WordPress.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2018-06-14T14:47:00+00:00","article_modified_time":"2021-06-07T21:00:37+00:00","author":"Christopher Maiorana","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Christopher Maiorana","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/"},"author":{"name":"Christopher Maiorana","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f"},"headline":"How to Make a Custom Post Type","datePublished":"2018-06-14T14:47:00+00:00","dateModified":"2021-06-07T21:00:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/"},"wordCount":768,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["WordPress Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/","name":"How to Make a Custom Post Type | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2018-06-14T14:47:00+00:00","dateModified":"2021-06-07T21:00:37+00:00","description":"In this article, we are going to create custom post types in WordPress.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-make-a-custom-post-type\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Make a Custom Post Type"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f","name":"Christopher Maiorana","description":"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.","sameAs":["https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":56,"name":"WordPress Tutorials","slug":"wordpress","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=4545"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4545\/revisions"}],"predecessor-version":[{"id":73840,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4545\/revisions\/73840"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=4545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=4545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=4545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}