{"id":94938,"date":"2022-10-22T09:57:00","date_gmt":"2022-10-22T14:57:00","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=94938"},"modified":"2025-01-07T14:56:34","modified_gmt":"2025-01-07T20:56:34","slug":"wordpress-custom-post-guide","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/","title":{"rendered":"WordPress Custom Post Types"},"content":{"rendered":"\n<p>Niche websites can sometimes have content organization needs that are not met by WordPress\u2019 native post types. For that reason, you may have wondered if there are alternative options when it comes to organizing and displaying your content.&nbsp;<\/p>\n\n\n\n<p>Fortunately, Custom Post Types (CPTs) are an option in WordPress that enables you to create a new kind of content and customize it however you like. This can be very helpful if you run a WordPress website that features content elements beyond the traditional posts and pages.&nbsp;<\/p>\n\n\n\n<p>In this article, we\u2019ll explain custom post types and their structures. Additionally, we\u2019ll give you a walkthrough of how to create a WordPress custom post type both manually and using a WordPress plugin. If you\u2019re ready, let\u2019s get started!<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">What are custom post types?<\/h2>\n\n\n\n<p>Your WordPress database automatically creates a <em>wp_posts<\/em> table when you install the software on your web server. This table includes a <em>post_type<\/em> column, where the information we\u2019ll be talking about is stored.&nbsp;&nbsp;<\/p>\n\n\n\n<p>There\u2019s several WordPress post types that you&#8217;ll likely be familiar with, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Post:<\/strong> The traditional \u2018blog\u2019 WordPress post that appears in reverse chronological order, and can be assigned categories and tags.<\/li>\n\n\n\n<li><strong>Page:<\/strong> These can be structured with parent-child relationships to create a hierarchy, but typically are not assigned categories.<\/li>\n\n\n\n<li><strong>Nav Menu: <\/strong>A list of links that helps visitors navigate your website.&nbsp;<\/li>\n\n\n\n<li><strong>Revision: <\/strong>These keep a log or history of changes to your other post types, in case you need to roll back to a previous version.&nbsp;<\/li>\n\n\n\n<li><strong>Attachment: <\/strong>Any media you add to your posts or pages also gets stored as a WordPress post type, and your image or video file data is stored in the <em>wp_postmeta<\/em> table.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>Additionally, WordPress includes two main taxonomy structures. Categories and tags are the primary way of assigning posts to different groups. While you can assign categories and tags to a CPT, you might find it necessary to also create custom taxonomies, in order to better organize your content.&nbsp;<\/p>\n\n\n\n<p>One example of how this might apply is with products in an eCommerce store. You can create a \u2018Products\u2019 CPT with custom fields for information like pricing, quantity, and so on. Then, with a custom taxonomy you can create options for categorizing your products in just about any way you might imagine.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to create a custom post type \u2013 plugin method (in 4 steps)<\/h2>\n\n\n\n<p>The easiest way to create CPTs is with a WordPress plugin. Let\u2019s walk through how that process works.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Download a dedicated plugin<\/h3>\n\n\n\n<p>For this example, we\u2019ll use the free <a href=\"https:\/\/www.advancedcustomfields.com\/\">Advanced Custom Fields <\/a>(ACF) plugin. ACF enables you to create CPTs, custom taxonomies, and includes more than 30 custom field types to fully customize your site.&nbsp;<\/p>\n\n\n\n<p>The first step is to <a href=\"https:\/\/www.advancedcustomfields.com\/download\/\">download<\/a> the latest version of ACF, and then <a href=\"https:\/\/www.advancedcustomfields.com\/blog\/installing-and-upgrading-to-the-latest-version-of-acf\/\">install and activate<\/a> the plugin. Once you\u2019ve done that, head to the <em>ACF Post Type<\/em> screen in your WordPress dashboard:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1779\" height=\"985\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/10\/ACF-Custom-Post-Types-Add-Custom-Post-Type-Screen.png\" alt=\"The Post Type screen in Advanced Custom Fields. \" class=\"wp-image-155147\" style=\"width:877px\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Custom-Post-Types-Add-Custom-Post-Type-Screen.png 1779w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Custom-Post-Types-Add-Custom-Post-Type-Screen-540x299.png 540w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Custom-Post-Types-Add-Custom-Post-Type-Screen-1024x567.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Custom-Post-Types-Add-Custom-Post-Type-Screen-768x425.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Custom-Post-Types-Add-Custom-Post-Type-Screen-1536x850.png 1536w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Custom-Post-Types-Add-Custom-Post-Type-Screen-1500x831.png 1500w\" sizes=\"auto, (max-width: 1779px) 100vw, 1779px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Add a new custom post type<\/h3>\n\n\n\n<p>Next, click <em>Add New<\/em> or <em>Add Post Type<\/em>. This screen will also show you any CPTs you\u2019ve already created.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Configure your new post type<\/h3>\n\n\n\n<p>Fill out the required fields for <em>Plural Label<\/em>, <em>Single Label<\/em>, and <em>Post Type Key<\/em>. Clicking in the <em>Taxonomies<\/em> field will open a dropdown menu where you can select one or more of the existing taxonomies on your site to classify your posts. You can add additional taxonomies to your CPT later if needed. Since we\u2019re creating a CPT for products, it\u2019s probably best to select both Categories and Tags. You may also want to <a href=\"https:\/\/wpengine.com\/resources\/how-to-create-custom-taxonomies-in-wordpress\/\">create a new custom taxonomy<\/a> to classify your posts.&nbsp;<\/p>\n\n\n\n<p>There are also three toggle switches: <em>Public<\/em>, <em>Hierarchical<\/em>, and <em>Advanced Configuration<\/em>. \u201cPublic\u201d is toggled on by default. Switching on \u201cHierarchical\u201d means your CPT can have descendants, similar to how WordPress Pages operate. The \u201cAdvanced Configuration\u201d toggle gives you fine-grained control over your CPTs settings. Please see the <a href=\"https:\/\/www.advancedcustomfields.com\/resources\/registering-a-custom-post-type\/#advanced-configuration\">ACF documentation<\/a> for more information on advanced configuration options for CPTs.&nbsp;<\/p>\n\n\n\n<p>Click <em>Save Changes<\/em> to save your new custom post type.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1880\" height=\"1326\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/10\/ACF-Add-New-Post-Type-with-Labels-Shown.png\" alt=\"The custom post type editor in ACF, with fields for defining the Plural Label (Products), Singular Label (Product), and Post Type Key (product).\" class=\"wp-image-155148\" style=\"width:877px\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Add-New-Post-Type-with-Labels-Shown.png 1880w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Add-New-Post-Type-with-Labels-Shown-540x381.png 540w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Add-New-Post-Type-with-Labels-Shown-1024x722.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Add-New-Post-Type-with-Labels-Shown-768x542.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Add-New-Post-Type-with-Labels-Shown-1536x1083.png 1536w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Add-New-Post-Type-with-Labels-Shown-1500x1058.png 1500w\" sizes=\"auto, (max-width: 1880px) 100vw, 1880px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Create custom fields<\/h3>\n\n\n\n<p>ACF gives you a notification that the CPT has been created, including helpful links to add custom fields, link existing field groups, create another CPT, duplicate an existing post type, or create a custom taxonomy.&nbsp;<\/p>\n\n\n\n<p>There\u2019s practically no limit to the ways you can customize a CPT with ACF, but for now we\u2019ll just add a single custom field for \u201cPrice.\u201d<\/p>\n\n\n\n<p>First, click <em>Add fields<\/em> in the ACF notification bar. This will take you to the ACF field group editor, where you can add your new custom field. Click the dropdown under \u201cField Type\u201d and select <em>Number<\/em>. We could leave it as a text field, but using the Number field means content editors will be restricted to numerical values when entering data in this field. Fill in \u201cPrice\u201d in the Field Label area, and ACF will automatically populate the Field Name section.\u00a0<\/p>\n\n\n\n<p>At this point, we could click <em>Save Changes<\/em> and our new field would be attached to our Products CPT. However, let\u2019s take a moment to make life easier when we add new products. Click the <em>Presentation<\/em> tab under the Price field and enter a \u201c$\u201d in the<em> Prepend<\/em> area. This ensures someone entering new products on the site doesn\u2019t have to remember to include the currency symbol.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1856\" height=\"1425\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/10\/ACF-CPT-Presentation-Tab.png\" alt=\"The Presentation tab in the ACF field group editor. \" class=\"wp-image-155149\" style=\"width:877px\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-CPT-Presentation-Tab.png 1856w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-CPT-Presentation-Tab-540x415.png 540w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-CPT-Presentation-Tab-1024x786.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-CPT-Presentation-Tab-768x590.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-CPT-Presentation-Tab-1536x1179.png 1536w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-CPT-Presentation-Tab-1500x1152.png 1500w\" sizes=\"auto, (max-width: 1856px) 100vw, 1856px\" \/><\/figure>\n\n\n\n<p>Next, scroll down to the field group\u2019s settings. The first tab shows the Location Rules that govern where the custom field will appear. Because we created this field directly from the custom post type screen, It should automatically be set to appear when the post type is equal to \u201cProducts.\u201d However, you can also set this manually, add additional post types where the field will appear, and so on.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1630\" height=\"464\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/10\/ACF-Settings-and-Location-Rules.png\" alt=\"The Settings screen of ACF with the Location Rules tab showing. The other two tabs are Presentation and Group Settings. \" class=\"wp-image-155150\" style=\"width:877px\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Settings-and-Location-Rules.png 1630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Settings-and-Location-Rules-540x154.png 540w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Settings-and-Location-Rules-1024x291.png 1024w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Settings-and-Location-Rules-768x219.png 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Settings-and-Location-Rules-1536x437.png 1536w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2022\/10\/ACF-Settings-and-Location-Rules-1500x427.png 1500w\" sizes=\"auto, (max-width: 1630px) 100vw, 1630px\" \/><\/figure>\n\n\n\n<p>Finally, click <em>Save Changes<\/em> and your new CPT will be ready to use with the custom \u201cPrice\u201d field included.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to create a custom post type \u2013 manual method (in 3 steps)<\/h2>\n\n\n\n<p>You can also create a CPT manually by editing <a href=\"https:\/\/codex.wordpress.org\/Functions_File_Explained\" target=\"_blank\" rel=\"noreferrer noopener\">your website\u2019s <em>functions.php<\/em> file<\/a>. We recommend making a copy of your file or <a href=\"https:\/\/wpengine.com\/support\/restore\/\" target=\"_blank\" rel=\"noreferrer noopener\">backing up your site<\/a> before starting.&nbsp;&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Locate and open your <em>functions.php<\/em> file<\/h3>\n\n\n\n<p>You can either access your site\u2019s files through your <a href=\"https:\/\/wpengine.com\/support\/wp-engine-user-portal\/\" target=\"_blank\" rel=\"noreferrer noopener\">web host\u2019s file manager<\/a> in your cPanel, or with a File Transfer Protocol (FTP) application like <a href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">FileZilla<\/a>. Once you\u2019re connected you\u2019ll navigate to your WordPress root folder, and then to <em>wp-content <\/em>&gt;<em> themes <\/em>&gt;<em> your-theme<\/em>.<\/p>\n\n\n\n<p>It\u2019s important to note that each theme has its own <em>functions.php<\/em> file. If you choose to use the manual process for creating CPTs, you\u2019ll lose them if you change your WordPress theme. If you want to make sure your custom types are preserved no matter what, it\u2019s best to use the plugin method instead.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Insert custom post type code<\/h3>\n\n\n\n<p>The amount of detail you can include in a CPT is pretty vast. We\u2019ll use <a href=\"https:\/\/gist.github.com\/braddalton\/e219bb7f26a69a1b9caf#file-functions-php\" target=\"_blank\" rel=\"noreferrer noopener\">a simple example<\/a> to demonstrate how you can create a \u2018Product\u2019 CPT. You\u2019ll see the same kinds of label options and settings that were available in the WordPress plugin settings earlier:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/* Create Custom Post Type\nadd_action( 'init', 'add_custom_post_type');\nfunction add_custom_post_type()&nbsp;\n{\n     register_post_type( 'my_products',\n           array(\n               'labels' =&gt; array(\n                    'name' =&gt; \u2018Products\u2019,\n                    'singular_name' =&gt; \u2018Product\u2019,\n                    'add_new'&nbsp; =&gt; \u2018Add New Product\u2019,\n                    'add_new_item' =&gt; \u2018Add New Item\u2019,\n                    'edit_item' =&gt; 'Edit Product',\n                    'new_item' =&gt; \u2018New Product\u2019,\n               ),\n               'public' =&gt; true,\n               \u2018has_archive =&gt; true,\n               \u2018rewrite\u2019 =&gt; array(\n                         \u2018Slug\u2019 =&gt; \u2018products\u2019\n               ),\n               'supports' =&gt; array(&nbsp;\n                         'title',&nbsp;\n                         'editor',&nbsp;\n                         'author',&nbsp;\n                         'thumbnail',&nbsp;\n                         'excerpt',&nbsp;\n                         'trackbacks',&nbsp;\n                         'custom-fields',&nbsp;\n                         'revisions',&nbsp;\n                         'page-attributes'&nbsp;\n               ), \n          )\n     );\n\n}<\/pre>\n\n\n\n<p>You\u2019ll want to add this code to the end of the <em>functions.php<\/em> file in your site\u2019s theme folder. Of course, there are many more options that you can add in your CPT code as well, which can be found on <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">resource sites like GitHub<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Add your site\u2019s text domain<\/h2>\n\n\n\n<p>If your site is translation ready and you want your CPT to be as well, you\u2019ll need to locate <a href=\"https:\/\/wordpress.stackexchange.com\/questions\/75759\/what-is-a-theme-textdomain\" target=\"_blank\" rel=\"noreferrer noopener\">your site\u2019s text domain<\/a> and make sure it\u2019s included in the code you use for your CPT.&nbsp;<\/p>\n\n\n\n<p>You can find your site\u2019s text domain in the <em>style.css <\/em>file for your WordPress theme.<\/p>\n\n\n\n<p>Once you open <em>style.css<\/em>, you will find \u201ctext domain\u201d information in the file\u2019s header.<\/p>\n\n\n\n<p>You can then reference the text domain in your customizations. For example, in the \u201clabels\u201d array from the example code above, you would add your text domain after \u201cProducts\u201d :&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'name' =&gt; \u2018Products\u2019, \u2018twentynineteen\u2019,<\/pre>\n\n\n\n<p>You would add the text domain to all labels in your custom post type, in order to make it translatable.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Displaying custom post types on your site (2 methods)<\/h2>\n\n\n\n<p>Once you create your CPT, you have a couple of options when it comes to displaying them on your site. We\u2019re going to cover two methods you can use.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Use a default archive template<\/h3>\n\n\n\n<p>One way to make sure your CPTs will appear on your site is by adjusting the code you use to create them. You can include the following string in your array:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u2018has_archive\u2019 =&gt; true,&nbsp;<\/pre>\n\n\n\n<p>Once you do this, your CPT will have its own archive page based on your theme\u2019s archive page template.&nbsp; You can then access your new CPT archive page by using the URL <em>www.yoursite.com\/customposttype<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Display them on your front page<\/h3>\n\n\n\n<p>One of the benefits of creating CPTs is the ability to keep certain content separate from a regular blog post. If you want to make sure this content makes it onto your front page, however, you\u2019ll need to add a <a href=\"https:\/\/gist.github.com\/alwerner\/5039231\" target=\"_blank\" rel=\"noreferrer noopener\">small snippet of code<\/a> to your theme\u2019s <em>functions.php<\/em> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Display Custom Post Types on home page, add to functions.php\n\n&nbsp;&nbsp;&nbsp;&nbsp;add_filter( 'pre_get_posts', 'my_get_posts' );\n\n&nbsp;&nbsp;&nbsp;&nbsp;function my_get_posts( $query ) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( is_home() &amp;&amp; $query-&gt;is_main_query() )\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query-&gt;set( 'post_type', array( 'products' ) );&nbsp;\n\/\/add cpt, in this case 'products' to array\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $query;\n&nbsp;&nbsp;&nbsp;&nbsp;}<\/pre>\n\n\n\n<p>Naturally, you would also customize this snippet to include your CPT\u2019s name and other key details.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Customize your site with WP Engine<\/h2>\n\n\n\n<p>Custom post types are a dynamic way for you to further customize your WordPress site, and deliver well-organized custom content types to your site\u2019s visitors. Here at WP Engine, we offer the <a href=\"https:\/\/wpengine.com\/resources\/\" target=\"_blank\" rel=\"noreferrer noopener\">best resources<\/a> for users and developers, and can help you create an incredible digital experience for your customers.&nbsp;<\/p>\n\n\n\n<p>In order to develop a truly engaging digital experience, you need <a href=\"https:\/\/wpengine.com\/managed-wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">managed hosting for WordPress<\/a> solutions tailored to meet your WordPress needs. Check out our innovative resources and <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">hosting for WordPress<\/a> plans today!\u00a0\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Niche websites can sometimes have content organization needs that are not met by WordPress\u2019 native post types. For that reason, you may have wondered if there are alternative options when it comes to organizing and displaying your content.&nbsp; Fortunately, Custom Post Types (CPTs) are an option in WordPress that enables you to create a new<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":297,"featured_media":130991,"template":"","resource-topic":[901],"resource-role":[896,903,1296],"resource-type":[916],"class_list":["post-94938","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create WordPress Custom Post Type | WP Engine\u00ae<\/title>\n<meta name=\"description\" content=\"Sometimes the default WordPress categories don&#039;t exactly match your content. Learn how to create a WordPress custom post type with WP Engine.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create WordPress Custom Post Type | WP Engine\u00ae\" \/>\n<meta property=\"og:description\" content=\"Sometimes the default WordPress categories don&#039;t exactly match your content. Learn how to create a WordPress custom post type with WP Engine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-07T20:56:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/02\/shutterstock_1510945454-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/\",\"name\":\"How to Create WordPress Custom Post Type | WP Engine\u00ae\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2022-10-22T14:57:00+00:00\",\"dateModified\":\"2025-01-07T20:56:34+00:00\",\"description\":\"Sometimes the default WordPress categories don't exactly match your content. Learn how to create a WordPress custom post type with WP Engine.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WordPress Custom Post Types\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/3a22232b01de39dcf588fb8e421c0521\",\"name\":\"Erin Myers\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g\",\"caption\":\"Erin Myers\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create WordPress Custom Post Type | WP Engine\u00ae","description":"Sometimes the default WordPress categories don't exactly match your content. Learn how to create a WordPress custom post type with WP Engine.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How to Create WordPress Custom Post Type | WP Engine\u00ae","og_description":"Sometimes the default WordPress categories don't exactly match your content. Learn how to create a WordPress custom post type with WP Engine.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2025-01-07T20:56:34+00:00","og_image":[{"width":1100,"height":500,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/02\/shutterstock_1510945454-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/","name":"How to Create WordPress Custom Post Type | WP Engine\u00ae","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2022-10-22T14:57:00+00:00","dateModified":"2025-01-07T20:56:34+00:00","description":"Sometimes the default WordPress categories don't exactly match your content. Learn how to create a WordPress custom post type with WP Engine.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-custom-post-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"WordPress Custom Post Types"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/3a22232b01de39dcf588fb8e421c0521","name":"Erin Myers","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g","caption":"Erin Myers"}}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2019\/10\/shutterstock_442886023.jpg","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Developer, Marketer, Publisher","topic":"<strong>Topics:<\/strong> WordPress","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/94938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/130991"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=94938"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=94938"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=94938"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=94938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}