{"id":2847,"date":"2016-10-17T10:59:55","date_gmt":"2016-10-17T10:59:55","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=2847"},"modified":"2023-10-04T07:39:59","modified_gmt":"2023-10-04T06:39:59","slug":"create-custom-post-type-custom-entries-wordpress","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/","title":{"rendered":"How to create Custom Post Type or Custom Entries in WordPress"},"content":{"rendered":"<p>The Custom Post Type is basically a customized entry in WordPress, and this is a very useful feature for those who need to customize their website most of the time. By default, WordPress does not allow this types of customization in the entries, forcing us to use plugins or touch the code to create them and display them.<\/p>\n<p>Although there are plugins that can solve the problem but it is always good to know what they do, if at some point we have to touch the code. So let&#8217;s see how to manually create the Custom Post Type in WordPress. An advanced step in customizing our website created with popular content management, as we advance in the article on static pages. However, in this tutorial, we also listed some of the WordPress plugins that allow\u00a0us to customize the entries without getting into programming.<\/p>\n<p>If we want to create a custom entry, we have to go to functions.php file of our WordPress theme where we add the following code.<\/p>\n<p><strong>As an example, let&#8217;s make an example of own entry called Journals:<\/strong><\/p>\n<pre class=\"plain:false plain-toggle:false copy:false popup:false lang:default decode:true\">\/\/ function will not be used before the 'init'.\n\nadd_action ( 'init', 'my_custom_init');\n\nmy_custom_init function () {\n\n$ Labels = array (\n\n('General post type name' 'Journals') 'name' =&gt; _x,\n\n'Singular_name' =&gt; _x ('Journal', 'post type singular name'),\n\n'Add_new' =&gt; _x ('Add new' 'Journal'),\n\n'Add_new_item' =&gt; __ ('Add New Journal'),\n\n'Edit_item' =&gt; __ ('Edit Journal'),\n\n'New_item' =&gt; __ ('New Journal'),\n\n'View_item' =&gt; __ ('See Journal'),\n\n'Search_items' =&gt; __ ('Search Journals'),\n\n'Not_found' =&gt; __ ('No Journal found'),\n\n'Not_found_in_trash' =&gt; __ ('No Journal found in the trash'),\n\n'Parent_item_colon' =&gt; ''\n\n);\n\n\n\n\/\/ create an array to $ args\n\n$ Args = array ( 'labels' =&gt; $ labels,\n\n'Public' =&gt; true,\n\n'Publicly_queryable' =&gt; true,\n\n'Show_ui' =&gt; true,\n\n'Query_var' =&gt; true,\n\n'Rewrite' =&gt; true,\n\n'Capability_type' =&gt; 'post',\n\n'Hierarchical' =&gt; false,\n\n'Menu_position' =&gt; null,\n\n'Supports' =&gt; array ('title', 'editor', 'author', 'thumbnail', 'excerpt' 'comments')\n\n);\n\n\n\nregister_post_type ('Journal', $ args);\n\n}<\/pre>\n<p>This code is not too complicated and only need to change the text to display in the way that interests us.<\/p>\n<p>With this, we will be creating a custom entry and that is already present on our desktop.<\/p>\n<h4>Ratings<\/h4>\n<p>If you look at the post we see that we have no taxonomy for journals. That is, we have no classification: No genres or authors.<\/p>\n<p><strong>To create taxonomies, we will need the following code:<\/strong><\/p>\n<pre class=\"plain:false plain-toggle:false copy:false popup:false lang:default decode:true\">\/\/ the init hooked in action and call the create_journal_taxonomies () function when starting\n\nadd_action ( 'init', 'create_journal_taxonomies', 0);\n\n\/\/ we created two taxonomies, genre and author for the custom post type \"journal\"\n\ncreate_journal_taxonomies function () {\n\n\/\/ we add new taxonomy and do hierarchical (as the default categories)\n\n$ Labels = array (\n\n'Name' =&gt; _x ('Genres', 'General taxonomy name'),\n\n'Singular_name' =&gt; _x ('Genre', 'taxonomy singular name'),\n\n'Search_items' =&gt; __ ('Search Genre'),\n\n'All_items' =&gt; __ ('All Genders'),\n\n'Parent_item' =&gt; __ ('Gender father'),\n\n'Parent_item_colon' =&gt; __ ('Gender father'),\n\n'Edit_item' =&gt; __ ('Edit Gender'),\n\n'Update_item' =&gt; __ ('Update Gender'),\n\n'Add_new_item' =&gt; __ ('Add new Gender'),\n\n'New_item_name' =&gt; __ ('name new Gender'),\n\n);\n\nregister_taxonomy ( 'genre', array ( 'journal'), array (\n\n'Hierarchical' =&gt; true,\n\n'Labels' =&gt; $ labels, \/ * this is where the labels $ variable are we created above using * \/\n\n'Show_ui' =&gt; true,\n\n'Query_var' =&gt; true,\n\n'Rewrite' =&gt; array ('slug' =&gt; 'gender'),\n\n));\n\n\/\/ I add another taxonomy, this time it is not hierarchical, as tags.\n\n$ Labels = array (\n\n'Name' =&gt; _x ('Writers', 'General taxonomy name'),\n\n'Singular_name' =&gt; _x ('writer', 'taxonomy singular name'),\n\n'Search_items' =&gt; __ ('Search Writers'),\n\n'Popular_items' =&gt; __ ('Popular writers'),\n\n'All_items' =&gt; __ ('All writers'),\n\n'Parent_item' =&gt; null,\n\n'Parent_item_colon' =&gt; null,\n\n'Edit_item' =&gt; __ ('Edit Writer'),\n\n'Update_item' =&gt; __ ('Update Writer'),\n\n'Add_new_item' =&gt; __ ('Add new writer'),\n\n'New_item_name' =&gt; __ ('Name of the new writer'),\n\n'Separate_items_with_commas' =&gt; __ ('Comma Separate Writers'),\n\n'Add_or_remove_items' =&gt; __ ('Add or remove Writers'),\n\n'Choose_from_most_used' =&gt; __ ('Choosing among the most used Writers')\n\n);\n\nregister_taxonomy ( 'writer', 'journal', array (\n\n'Hierarchical' =&gt; false,\n\n'Labels' =&gt; $ labels,\n\n'Show_ui' =&gt; true,\n\n'Query_var' =&gt; true,\n\n'Rewrite' =&gt; array ('slug' =&gt; 'writer'),\n\n));\n\n}<\/pre>\n<p>In this code, we refer to the customization of the entry you want to add taxonomies to, recalling must be added to functions.php file of our theme.<\/p>\n<h4>Custom Post Type Plugins<\/h4>\n<p>Then here are some of the selected plugins that can let you customize the entries.<\/p>\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/custom-post-type-ui\/\">Custom Post Type UI<\/a>: Very intuitive and easy to use.<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/types\/\">Toolset Types<\/a>: In addition to creating custom entries, it allows us to create individualized taxonomies and fields.<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/pods\/\">Pods<\/a>: A complete plugin that is previously mentioned in the list of other plugins, templates, and other features options.<\/li>\n<\/ul>\n<p>If you are starting with WordPress, we recommend you to take a look at our post about <a href=\"https:\/\/www.milesweb.co.uk\/blog\/technology-hub\/50-best-wordpress-plugins-upgrade-blog-special-edition\/\">50 useful and recommended plugins for Getting Started with WordPress<\/a>. If you have programming skills or want to know more about the WordPress, you can take advantage of our WordPress Category here (<a href=\"https:\/\/www.milesweb.co.uk\/blog\/category\/wordpress\/\">link<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Custom Post Type is basically a customized entry in WordPress, and this is a very useful feature for those who need to customize their website most of the time. By default, WordPress does not allow this types of customization in the entries, forcing us to use plugins or touch the code to create them [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":2854,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-2847","post","type-post","status-publish","format-standard","has-post-thumbnail","placeholder-for-hentry","category-wordpress-faq"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create Custom Post Type or Custom Entries in WordPress<\/title>\n<meta name=\"description\" content=\"Customized entries with the custom themes gives the perfect WordPress site giving more compelling look to it.\" \/>\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.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create Custom Post Type or Custom Entries in WordPress\" \/>\n<meta property=\"og:description\" content=\"Customized entries with the custom themes gives the perfect WordPress site giving more compelling look to it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-17T10:59:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-04T06:39:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png\" \/>\n\t<meta property=\"og:image:width\" content=\"848\" \/>\n\t<meta property=\"og:image:height\" content=\"288\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pravin Ganore\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pravin Ganore\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated 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\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/\",\"name\":\"How to create Custom Post Type or Custom Entries in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png\",\"datePublished\":\"2016-10-17T10:59:55+00:00\",\"dateModified\":\"2023-10-04T06:39:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/9f6aad74f4af57132ba60117b4ab3ea6\"},\"description\":\"Customized entries with the custom themes gives the perfect WordPress site giving more compelling look to it.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png\",\"width\":848,\"height\":288},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create Custom Post Type or Custom Entries in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/9f6aad74f4af57132ba60117b4ab3ea6\",\"name\":\"Pravin Ganore\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0cc3f850bd88b8c03fef8afc4399e314?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0cc3f850bd88b8c03fef8afc4399e314?s=96&d=blank&r=g\",\"caption\":\"Pravin Ganore\"},\"description\":\"Pravin is Journalist Specializing in Blogging, Social Networking and Community Management. As a constant learner, he is always aiming towards new ideas and greater knowledge. When he is not doing research, reading, or writing for blogs, you can find him hanging around social media sites.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pravin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create Custom Post Type or Custom Entries in WordPress","description":"Customized entries with the custom themes gives the perfect WordPress site giving more compelling look to it.","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.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/","og_locale":"en_GB","og_type":"article","og_title":"How to create Custom Post Type or Custom Entries in WordPress","og_description":"Customized entries with the custom themes gives the perfect WordPress site giving more compelling look to it.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2016-10-17T10:59:55+00:00","article_modified_time":"2023-10-04T06:39:59+00:00","og_image":[{"width":848,"height":288,"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png","type":"image\/png"}],"author":"Pravin Ganore","twitter_misc":{"Written by":"Pravin Ganore","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/","name":"How to create Custom Post Type or Custom Entries in WordPress","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png","datePublished":"2016-10-17T10:59:55+00:00","dateModified":"2023-10-04T06:39:59+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/9f6aad74f4af57132ba60117b4ab3ea6"},"description":"Customized entries with the custom themes gives the perfect WordPress site giving more compelling look to it.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2016\/10\/create-custom-post-Type-wp.png","width":848,"height":288},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/create-custom-post-type-custom-entries-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to create Custom Post Type or Custom Entries in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/9f6aad74f4af57132ba60117b4ab3ea6","name":"Pravin Ganore","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0cc3f850bd88b8c03fef8afc4399e314?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0cc3f850bd88b8c03fef8afc4399e314?s=96&d=blank&r=g","caption":"Pravin Ganore"},"description":"Pravin is Journalist Specializing in Blogging, Social Networking and Community Management. As a constant learner, he is always aiming towards new ideas and greater knowledge. When he is not doing research, reading, or writing for blogs, you can find him hanging around social media sites.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pravin\/"}]}},"views":1703,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/2847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=2847"}],"version-history":[{"count":7,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/2847\/revisions"}],"predecessor-version":[{"id":15108,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/2847\/revisions\/15108"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media\/2854"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=2847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=2847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=2847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}