[{"data":1,"prerenderedAt":115},["ShallowReactive",2],{"page:\u002Fsteps-to-create-a-custom-post-type-without-the-plugin\u002F":3},{"page":4,"integrations":40,"settings":41,"includes":89,"collections":93,"forms":111,"origin":112,"site_key":113,"tenant_key":114},{"seo":5,"path":12,"title":13,"blocks":14,"layout":30,"sidebar":31,"published":39},{"title":6,"noindex":7,"canonical":8,"description":9,"social_image":10,"focus_keyphrase":8,"related_keyphrases":11},"Steps to create a custom post type without the plugin. | Fast WordPress Developer",false,"","Do you want to know how to make custom post types in WordPress quickly and easily? Custom post types turn a WordPress site into a robust Content Management Syst",null,[],"\u002Fsteps-to-create-a-custom-post-type-without-the-plugin\u002F","Steps to create a custom post type without the plugin.",[15,19,22,24],{"html":16,"type":17,"variant":18},"\u003Cp>WORDPRESS \u002F DESIGN + DEVELOPMENT\u003C\u002Fp>\u003Cp>FROM THE ARTICLE ARCHIVE · 2022-01-04\u003C\u002Fp>\u003Cp>\u003Ca href=\"\u002Farchives\u002F\" rel=\"noopener noreferrer\">Explore the article archive ↗\u003C\u002Fa> \u003Ca href=\"\u002Fservices\u002F\" rel=\"noopener noreferrer\">Find WordPress help ↗\u003C\u002Fa>\u003C\u002Fp>","richtext","editorial",{"text":20,"type":21},"This article is retained from the previous website. WordPress screens, plugin behavior and instructions may have changed since it was written. Ask me for help with your current setup.","text",{"html":23,"type":17},"\u003Cp>Do you want to know how to make custom post types in WordPress quickly and easily? Custom post types turn a WordPress site into a robust Content Management System.\u003C\u002Fp>\n\n\n\n\u003Cp>They essentially enable you to create different content types for your website in addition to posts and pages.\u003C\u002Fp>\n\n\n\n\u003Cp>We'll show you how to make custom post types in WordPress quickly and efficiently in this article.\u003C\u002Fp>\n\n\n\n\u003Ch2>In WordPress, what exactly is a Custom Post Type?\u003C\u002Fh2>\n\n\n\n\u003Cp>Content kinds such as posts and pages are examples of custom post types. The term \"post\" has persisted with WordPress as it grew from a simple blogging platform to a comprehensive CMS. A post type, on the other hand, can be any material.\u003C\u002Fp>\n\n\n\n\u003Cp>These post kinds are included by default in WordPress:\u003C\u002Fp>\n\n\n\n\u003Cul>\n\u003Cli>Post\u003C\u002Fli>\n\n\n\n\u003Cli>Page\u003C\u002Fli>\n\n\n\n\u003Cli>Attachment\u003C\u002Fli>\n\n\n\n\u003Cli>Revision\u003C\u002Fli>\n\n\n\n\u003Cli>Nav Menu\u003C\u002Fli>\n\u003C\u002Ful>\n\n\n\n\u003Cp>You have the freedom to name your own post kinds whatever you wish.\u003C\u002Fp>\n\n\n\n\u003Cp>If you run a movie review website, for example, you'll almost certainly want to establish a movie reviews post type. This post type can contain a variety of custom fields as well as its own category hierarchy.\u003C\u002Fp>\n\n\n\n\u003Ch2>Manually&nbsp;Creating&nbsp;a&nbsp;Custom&nbsp;Post&nbsp;Type\u003C\u002Fh2>\n\n\n\n\u003Cp>The problem with using a plugin is that when you deactivate it, your custom post kinds will vanish. Any data you have in those custom post types will remain intact, but they will be unregistered and no longer accessible from the admin area.\u003C\u002Fp>\n\n\n\n\u003Cp>If you're working on a client site and don't want to install another plugin, you can create your own post type directly by including the necessary code in your theme's functions.php file or in a site-specific plugin (See: Custom Post Types Debate functions.php or Plugin).\u003C\u002Fp>\n\n\n\n\u003Cp>First, we'll walk you through a fast and completely functional example so you can see how it works. Examine the following code:\u003C\u002Fp>\n\n\n\n\u003Cp>\u002F\u002F Our custom post type function\u003Cbr>function create_posttype() {\u003Cbr>&nbsp; &nbsp; register_post_type( ‘movies’,\u003Cbr>&nbsp; &nbsp; \u002F\u002F CPT Options\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; array(\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘labels’ =&gt; array(\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘name’ =&gt; __( ‘Movies’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘singular_name’ =&gt; __( ‘Movie’ )\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘public’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘has_archive’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘rewrite’ =&gt; array(‘slug’ =&gt; ‘movies’),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘show_in_rest’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; )\u003Cbr>&nbsp; &nbsp; );\u003Cbr>}\u003Cbr>\u002F\u002F Hooking up our function to theme setup\u003Cbr>add_action( ‘init’, ‘create_posttype’ );\u003C\u002Fp>\n\n\n\n\n\n\n\n\u003Cp>This code registers the post-type Services along with an array of parameters. Our custom post type choices are represented by these arguments.\u003C\u002Fp>\n\n\n\n\u003Cp>The initial portion of this array is labeled, which is an array in itself. Other arguments in the second section include public visibility, which has an archive, slug, and show_in_rest, which enables block editor support.\u003C\u002Fp>\n\n\n\n\u003Cp>Now let's look at a more detailed piece of code that gives your custom post type extra choices.\u003C\u002Fp>\n\n\n\n\u003Cp>\u002F*\u003Cbr>* Creating a function to create our Custom Post Type\u003Cbr>*\u002F\u003Cbr>function custom_post_type() {\u003Cbr>\u002F\u002F Set UI labels for Custom Post Type\u003Cbr>&nbsp; &nbsp; $labels = array(\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘name’ =&gt; _x( ‘Services’, ‘Post Type General Name’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘singular_name’ =&gt; _x( ‘Service’, ‘Post Type Singular Name’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘menu_name’ =&gt; __( ‘Services’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘parent_item_colon’ =&gt; __( ‘Parent Service’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘all_items’ =&gt; __( ‘All Services’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘view_item’ =&gt; __( ‘View Service’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘add_new_item’ =&gt; __( ‘Add New Service’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘add_new’ =&gt; __( ‘Add New’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘edit_item’ =&gt; __( ‘Edit Service’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘update_item’ =&gt; __( ‘Update Service’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘search_items’ =&gt; __( ‘Search Service’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘not_found’ =&gt; __( ‘Not Found’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘not_found_in_trash’ =&gt; __( ‘Not found in Trash’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; );\u003Cbr>\u002F\u002F Set other options for Custom Post Type\u003Cbr>&nbsp; &nbsp; $args = array(\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘label’ =&gt; __( ‘Services’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘description’ =&gt; __( ‘Service news and reviews’, ‘twentytwenty’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘labels’ =&gt; $labels,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; \u002F\u002F Features this CPT supports in Post Editor\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘supports’ =&gt; array( ‘title’, ‘editor’, ‘excerpt’, ‘author’, ‘thumbnail’, ‘comments’, ‘revisions’, ‘custom-fields’, ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; \u002F\u002F You can associate this CPT with a taxonomy or custom taxonomy.\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘taxonomies’ =&gt; array( ‘genres’ ),\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; \u002F* A hierarchical CPT is like Pages and can have\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; * Parent and child items. A non-hierarchical CPT\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; * is like Posts.\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; *\u002F\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘hierarchical’ =&gt; false,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘public’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘show_ui’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘show_in_menu’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘show_in_nav_menus’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘show_in_admin_bar’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘menu_position’ =&gt; 5,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘can_export’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘has_archive’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘exclude_from_search’ =&gt; false,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘publicly_queryable’ =&gt; true,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘capability_type’ =&gt; ‘post’,\u003Cbr>&nbsp; &nbsp; &nbsp; &nbsp; ‘show_in_rest’ =&gt; true,\u003Cbr>&nbsp; &nbsp; );\u003Cbr>&nbsp; &nbsp; \u002F\u002F Registering your Custom Post Type\u003Cbr>&nbsp; &nbsp; register_post_type( ‘Services’, $args );\u003Cbr>}\u003Cbr>\u002F* Hook into the ‘init’ action so that the function\u003Cbr>* Containing our post type registration is not\u003Cbr>* unnecessarily executed.\u003Cbr>*\u002F\u003Cbr>add_action( ‘init’, ‘custom_post_type’, 0 );\u003C\u002Fp>\n\n\n\n\n\n\n\n\n\n\n\n\u003Cp>With this code, we've introduced a lot more choices to the custom post type, as you can see. Support for revisions, featured pictures, custom fields, and other features will be added.\u003C\u002Fp>\n\n\n\n\u003Cp>This new post type is also linked to a custom taxonomy called genres.\u003C\u002Fp>",{"href":25,"text":26,"type":27,"label":28,"heading":29},"mailto:info@fastwordpressdeveloper.com","Send your website address and tell me what you need. We’ll work out the next step together.","cta","Email me about your website ↗","Need help with this on your website?","right_sidebar",[32,35],{"href":25,"text":33,"type":27,"label":28,"heading":34},"Tell me what’s happening with your website.","Have a WordPress question?",{"type":36,"limit":37,"variant":38,"autoplay":7,"collection":38},"collection",1,"testimonials",true,[],{"logo":10,"colors":42,"contact":46,"business":51,"redirects":52,"navigation":53,"typography":66,"footer_text":70,"legal_links":71,"footer_links":78},{"accent":43,"primary":44,"secondary":45},"#1E1E1E","#3858E9","#FFFFFF",{"email":47,"phone":48,"address":49,"map_url":50},"info@fastwordpressdeveloper.com","+1 (561) 331-7479","Lake Worth, Florida","https:\u002F\u002Fwww.google.com\u002Fmaps\u002Fsearch\u002F?api=1&query=Lake+Worth+Florida","Fast WordPress Developer",[],[54,57,60,63],{"href":55,"label":56},"\u002Fservices\u002F","Services",{"href":58,"label":59},"\u002Fportfolio\u002F","Selected work",{"href":61,"label":62},"\u002Fabout\u002F","About",{"href":64,"label":65},"\u002Fcontact\u002F","Let’s talk ↗",{"body_font":67,"root_size":68,"heading_font":69},"system",16,"georgia","Thoughtful websites. Practical WordPress help.\nBased in Lake Worth, Florida. Working with businesses wherever they are.\n© 2026 Fast WordPress Developer.",[72,75],{"href":73,"label":74},"\u002Fprivacy\u002F","Privacy",{"href":76,"label":77},"\u002Fsitemap\u002F","Sitemap",[79,81,82,84,87],{"href":55,"label":80},"WordPress services",{"href":58,"label":59},{"href":61,"label":83},"About Naeem",{"href":85,"label":86},"\u002Farchives\u002F","Articles & resources",{"href":64,"label":88},"Get in touch",{"footer":90,"header":91,"sidebar":92},[],[],[],{"testimonials":94},[95,99,103,107],{"id":96,"name":97,"quote":98},76,"Widerson Orelus","My Family wanted to say that we were very impressed with the quality of the website, the price we paid compared to other web design company was extremely low. I love the finished product you provided us. I highly recommend you as a top website designer. Thank you, you’re the best!!",{"id":100,"name":101,"quote":102},77,"TROPICAL LANDSCAPING","Naeem is an excellent web designer and SEO specialist. It's always difficult to find someone who will build a clean website that is easy to navigate, SEO friendly, and very flexible.",{"id":104,"name":105,"quote":106},78,"European German Shepherds","I have worked with Naeemnn, on multiple occasions and his work is exceptional. He works so hard to get the website done in a timely manner, and charges a fair price. I would definitely recommend him. I'm sure I will continue to work with him in the future.",{"id":108,"name":109,"quote":110},79,"Dishsultan","I have worked with Naeem several times, on projects both big and small, and each time has been an absolute pleasure. He did an excellent job helping me build out my company's webpage and was very attentive to my needs. Naeem has always been very responsive with quick turnaround time. I've had such a great experience working with him that he's become a friend. Thanks for your help through the years Naeem!",[],"https:\u002F\u002Ffastwordpressdeveloper.com","main","fastwordpressdeveloper",1793568969138]