{"id":5216,"date":"2022-07-16T13:53:55","date_gmt":"2022-07-16T17:53:55","guid":{"rendered":"https:\/\/www.cloudsurph.com\/?p=5216"},"modified":"2022-07-23T09:20:20","modified_gmt":"2022-07-23T13:20:20","slug":"create-custom-post-types-in-wordpress-without-using-plugin","status":"publish","type":"post","link":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/","title":{"rendered":"Create Custom Post Types in WordPress without using Plugin"},"content":{"rendered":"<p>How to Create Custom Post Types in WordPress without using Plugin? Or How to Create Custom Post Types in WordPress? So, in this article, we will show you how to Create Custom Post Types in WordPress.<\/p>\n<p><strong>What Is Custom Post Type in WordPress CMS?<\/strong><\/p>\n<p>Custom post types allow you to go far posts and pages and create a different content type for your website or blog. Custom Post type transforms your WordPress website from a\u00a0blogging platform\u00a0into a powerful content management system (CMS) like WordPress.<\/p>\n<h5><em><strong>You can purchase your\u00a0<a href=\"https:\/\/hosting.cloudsurph.com\/\">hosting from Cloudsurph.com<\/a>,\u00a0<a href=\"https:\/\/hosting.cloudsurph.com\/\">Cloudsurph hosting<\/a>\u00a0is a reliable hosting option for business and personal projects. We offer insight and help on system configuration issues and code errors or bugs<\/strong>.<\/em><\/h5>\n<p>On your\u00a0<a href=\"https:\/\/wordpress.org\/support\/article\/how-to-install-wordpress\/\">WordPress website<\/a>, post types are used to help separate between different content types in WordPress blogs or websites.\u00a0Posts and pages\u00a0are both post types but are made to use different purposes.<\/p>\n<p>WordPress comes from a few different\u00a0post types\u00a0by default, given below:<\/p>\n<ul>\n<li>Post<\/li>\n<li>Page<\/li>\n<li>Attachment<\/li>\n<li>Revision<\/li>\n<li>Nav Menu<\/li>\n<\/ul>\n<p>So, you can also create your own post types, like custom post types. It is very useful when you create content that has an individual format than a default post or page.<\/p>\n<p><em><strong>IF you want then buy a good, reliable, secure web\u00a0<a href=\"https:\/\/www.cloudsurph.com\/windows-vps-hosting\/\">hosting<\/a>\u00a0service \u00a0from here:\u00a0<a href=\"https:\/\/hosting.cloudsurph.com\/\">click here<\/a><\/strong><\/em><\/p>\n<p>For example, if you run a movie review website, then you would probably need to create a movie reviews custom post type.<\/p>\n<p>So, you could also create custom post types for testimonials, portfolios, Notices, News, and products.<\/p>\n<h4>Why Do You Need to Create Custom Post Types?<\/h4>\n<p>Before you start creating custom post types on your WordPress website or any type of website that is made by WordPress, it is important to value your needs.<\/p>\n<p>And, a lot of times you can get the same results with a normal post or page.<\/p>\n<p>Now, we will show you the custom post type method, and also cover some ways you can display custom post types on your own WordPress website or Blogs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5218\" src=\"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/products-custom-post-type-in-wordpress.png\" alt=\"products-custom-post-type-in-wordpress\" width=\"1340\" height=\"561\" srcset=\"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/products-custom-post-type-in-wordpress.png 1340w, https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/products-custom-post-type-in-wordpress-1280x536.png 1280w, https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/products-custom-post-type-in-wordpress-980x410.png 980w, https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/products-custom-post-type-in-wordpress-480x201.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) and (max-width: 1280px) 1280px, (min-width: 1281px) 1340px, 100vw\" \/><\/p>\n<h3>Create Custom Post Types in WordPress without using Plugin<\/h3>\n<p>If you are working on your client\u2019s site and don\u2019t want to install any plugin, then you can manually create your own custom post type by adding the below code in your theme\u2019s\u00a0functions.php\u00a0file.<\/p>\n<p>SO, given below Custom Post Type code, you need to just place your theme function.php file, and no need for any task, just replace your post type name and save your file.<\/p>\n<pre class=\"prettyprint\">\r\n\r\n\/\/PRODUCTS POST TYPE\r\nadd_action('init', 'products_register');\r\n\r\nfunction products_register() {\r\n$labels = array(\r\n'name' =&gt; __('Products'),\r\n'singular_name' =&gt; __('Product'),\r\n'add_new' =&gt; __('Add Product'),\r\n'add_new_item' =&gt; __('Product'),\r\n'edit_item' =&gt; __('Edit Product'),\r\n'new_item' =&gt; __('New Product'),\r\n'view_item' =&gt; __('View Product'),\r\n'search_items' =&gt; __('Search Products'),\r\n'not_found' =&gt; __('Nothing found'),\r\n'not_found_in_trash' =&gt; __('Nothing found in Trash'),\r\n'parent_item' =&gt; __( 'Parent Product' ),\r\n'parent_item_colon' =&gt; __( 'Parent Product:' )\r\n);\r\n$args = array(\r\n'labels' =&gt; $labels,\r\n'public' =&gt; true,\r\n'show_ui' =&gt; true,\r\n'capability_type' =&gt; 'post',\r\n'hierarchical' =&gt; false,\r\n'has_archive' =&gt; false,\r\n'rewrite' =&gt; true,\r\n'query_var' =&gt; true,\r\n'menu_icon' =&gt; get_stylesheet_directory_uri() . '\/images\/icon-project.png',\r\n'supports' =&gt; array('title', 'editor', 'thumbnail', 'revisions', 'page-attributes')\r\n);\r\n\r\n\/\/ Initialize Category Labels\r\n$cproduct_cat = array(\r\n'name' =&gt; _x( 'Product Cat', 'taxonomy general name' ),\r\n'singular_name' =&gt; _x( 'Product Cat', 'taxonomy singular name' ),\r\n'search_items' =&gt; __( 'Search Category' ),\r\n'all_items' =&gt; __( 'All Category' ),\r\n'parent_item' =&gt; __( 'Parent Category' ),\r\n'parent_item_colon' =&gt; __( 'Parent Category:' ),\r\n'edit_item' =&gt; __( 'Edit Category' ),\r\n'update_item' =&gt; __( 'Update Category' ),\r\n'add_new_item' =&gt; __( 'Add New Category' ),\r\n'new_item_name' =&gt; __( 'New Category' ),\r\n);\r\nregister_taxonomy(\"cproducts-categories\", array(\"product\"),\r\narray(\r\n'hierarchical' =&gt; true,\r\n'show_ui' =&gt; true,\r\n'has_archive' =&gt; true,\r\n\"show_tagcloud\" =&gt; false,\r\n'labels' =&gt; $cproduct_cat,\r\n'query_var' =&gt; true,\r\n\"rewrite\" =&gt; array( 'slug' =&gt; 'cproducts-cat',\r\n\/\/ This controls the base slug that will display before each term\r\n'with_front' =&gt; false)\r\n)\r\n);\r\nregister_post_type( 'product' , $args );\r\nflush_rewrite_rules();\r\n\r\nadd_action( 'add_meta_boxes', 'product_meta_box_add' );\r\nfunction product_meta_box_add()\r\n{\r\nadd_meta_box( 'product_info_meta', 'Product Information', 'product_info_fnc', 'product', 'normal', 'high' );\r\n}\r\nfunction product_info_fnc( $post )\r\n{\r\n$custom = get_post_custom($post-&gt;ID);\r\n$ad_image = isset( $values['ad_image'] ) ? esc_attr( $values['ad_image'][0] ) : \"\";\r\n\r\nwp_nonce_field( 'my_meta_box_nonce', 'meta_box_nonce' );\r\n?&gt;\r\n&lt;div class=\"inside\" style=\"overflow:hidden;\"&gt;\r\n&lt;div style=\"float:left; width:99%; margin-right:1%;\"&gt;\r\n&lt;p&gt;&lt;strong&gt;Upload Your File Here&lt;\/strong&gt;&lt;br \/&gt;\r\n&lt;script&gt;\r\njQuery(document).ready(function($){\r\nvar custom_uploader;\r\n$('#upload_image_button').click(function(e) {\r\ne.preventDefault();\r\n\/\/If the uploader object has already been created, reopen the dialog\r\nif (custom_uploader) {\r\ncustom_uploader.open();\r\nreturn;\r\n}\r\n\/\/Extend the wp.media object\r\ncustom_uploader = wp.media.frames.file_frame = wp.media({\r\ntitle: 'Choose File',\r\nbutton: {\r\ntext: 'Choose File'\r\n},\r\nmultiple: true\r\n});\r\n\/\/When a file is selected, grab the URL and set it as the text field's value\r\ncustom_uploader.on('select', function() {\r\nconsole.log(custom_uploader.state().get('selection').toJSON());\r\nattachment = custom_uploader.state().get('selection').first().toJSON();\r\n$('#upload_image').val(attachment.url);\r\n});\r\n\/\/Open the uploader dialog\r\ncustom_uploader.open();\r\n});\r\n});\r\n&lt;\/script&gt;\r\n&lt;label for=\"upload_image\"&gt;\r\n&lt;input id=\"upload_image\" type=\"text\" size=\"36\" name=\"ad_image\" placeholder=\"https\/\/\" value=\"&lt;?= @$custom[\"ad_image\"][0] ?&gt;\" \/&gt;\r\n&lt;input id=\"upload_image_button\" class=\"button\" type=\"button\" value=\"Upload Doc. File\" \/&gt;\r\n&lt;br \/&gt;Enter a URL or upload your file&lt;\/label&gt; &lt;\/p&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;\/div&gt;\r\n&lt;?php\r\n}\r\n}\r\n\/\/ Save\r\nadd_action( 'save_post', 'product_info_meta_save' );\r\nfunction product_info_meta_save( $post_id )\r\n{\r\nif( defined( 'DOING_AUTOSAVE' ) &amp;&amp; DOING_AUTOSAVE ) return;\r\nif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\r\nif( !current_user_can( 'edit_post' ) ) return;\r\n\r\n$allowed = array(\r\n'a' =&gt; array( \/\/ on allow a tags\r\n'href' =&gt; array() \/\/ and those anchors can only have href attribute\r\n)\r\n);\r\n\/\/ Make sure your data is set before trying to save it\r\nif( isset( $_POST['ad_image'] ) )\r\nupdate_post_meta( $post_id, 'ad_image', wp_kses( $_POST['ad_image'], $allowed ) );\r\n\r\n}\r\nadd_filter(\"manage_edit-product_columns\", \"product_edit_columns\");\r\nfunction product_edit_columns($columns){\r\n$columns = array(\r\n\"cb\" =&gt; \"&lt;input type=\\\"checkbox\\\" \/&gt;\",\r\n\"title\" =&gt; \"Name \/ Title\",\r\n\"product-thumb\" =&gt; \"Photo\",\r\n\"cproducts-cats\" =&gt; \"Product Category\",\r\n);\r\nreturn $columns;\r\n}\r\nadd_action(\"manage_posts_custom_column\", \"product_custom_columns\");\r\nfunction product_custom_columns($column){\r\nglobal $post;\r\nswitch ($column)\r\n{\r\ncase \"cproducts-cats\":\r\necho get_the_term_list($post-&gt;ID, 'cproducts-categories', '', ', ', '');\r\nbreak;\r\ncase \"product-thumb\":\r\nif ( has_post_thumbnail() ) : the_post_thumbnail(array(100, 80)); else : echo 'No Photo'; endif;\r\nbreak;\r\n}\r\n}\r\n\r\n<\/pre>\n<p>That\u2019s it. If you enjoyed reading this article and have more questions please reach out to our\u00a0<a href=\"https:\/\/hosting.cloudsurph.com\/submitticket.php?step=2&amp;deptid=1\">support team<\/a>\u00a0via live chat or\u00a0<a href=\"mailto:support@cloudsurph.com\">email<\/a>\u00a0and we would be glad to help you. we provide server\u00a0<a href=\"https:\/\/hosting.cloudsurph.com\/\">hosting<\/a>\u00a0for all types of need and we can even get your\u00a0<a href=\"https:\/\/hosting.cloudsurph.com\/\">server<\/a>\u00a0up and running with the service of your choice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Create Custom Post Types in WordPress without using Plugin? Or How to Create Custom Post Types in WordPress? So, in this article, we will show you how to Create Custom Post Types in WordPress. What Is Custom Post Type in WordPress CMS? Custom post types allow you to go far posts and pages [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":5217,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[153,31,146,155,154,156],"tags":[54,47,105,103,48,113],"class_list":["post-5216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-theme-customization","category-web-hosting","category-wordpress","category-wordpress-theme","category-wp-custom-theme","category-wp-theme-options","tag-best-vps-hosting-server-maryland","tag-cheap-cloud-servers","tag-cheap-storage-server-hosting","tag-cheapest-vps","tag-dedicated-server-hosting-in-washington-d-c","tag-speed-test-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Custom Post Types in WordPress without using Plugin<\/title>\n<meta name=\"description\" content=\"How to Create Custom Post Types in WordPress without using Plugin, How 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.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Custom Post Types in WordPress without using Plugin\" \/>\n<meta property=\"og:description\" content=\"How to Create Custom Post Types in WordPress without using Plugin, How to Create Custom Post Types in WordPress\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudsurph Web Hosting Washington D.C.\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/CloudSurph\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-16T17:53:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-23T13:20:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1264\" \/>\n\t<meta property=\"og:image:height\" content=\"760\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rony\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cloudsurph\" \/>\n<meta name=\"twitter:site\" content=\"@Cloud_Surph\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rony\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/\"},\"author\":{\"name\":\"Rony\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#\\\/schema\\\/person\\\/ac9b4dd136d96e50d5f29c560191e7ed\"},\"headline\":\"Create Custom Post Types in WordPress without using Plugin\",\"datePublished\":\"2022-07-16T17:53:55+00:00\",\"dateModified\":\"2022-07-23T13:20:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/\"},\"wordCount\":487,\"publisher\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cloudsurph.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg\",\"keywords\":[\"Best VPS hosting server Maryland\",\"Cheap Cloud Servers\",\"Cheap Storage Server Hosting\",\"Cheapest VPS\",\"Dedicated Server Hosting in Washington D.C\",\"Speed test VPS\"],\"articleSection\":[\"Theme Customization\",\"Web Hosting\",\"WordPress\",\"WordPress Theme\",\"WP Custom Theme\",\"WP Theme Options\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/\",\"url\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/\",\"name\":\"Create Custom Post Types in WordPress without using Plugin\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cloudsurph.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg\",\"datePublished\":\"2022-07-16T17:53:55+00:00\",\"dateModified\":\"2022-07-23T13:20:20+00:00\",\"description\":\"How to Create Custom Post Types in WordPress without using Plugin, How to Create Custom Post Types in WordPress\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.cloudsurph.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg\",\"contentUrl\":\"https:\\\/\\\/www.cloudsurph.com\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg\",\"width\":1264,\"height\":760},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/create-custom-post-types-in-wordpress-without-using-plugin\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cloudsurph.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Custom Post Types in WordPress without using Plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#website\",\"url\":\"https:\\\/\\\/www.cloudsurph.com\\\/\",\"name\":\"Cloudsurph Web Hosting Washington D.C.\",\"description\":\"Dedicated Server Hosting\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.cloudsurph.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#organization\",\"name\":\"CloudSurph Technology Solutions\",\"url\":\"https:\\\/\\\/www.cloudsurph.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.cloudsurph.com\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/cloudsurph-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.cloudsurph.com\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/cloudsurph-logo.png\",\"width\":2348,\"height\":1692,\"caption\":\"CloudSurph Technology Solutions\"},\"image\":{\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/CloudSurph\\\/\",\"https:\\\/\\\/x.com\\\/Cloud_Surph\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.cloudsurph.com\\\/#\\\/schema\\\/person\\\/ac9b4dd136d96e50d5f29c560191e7ed\",\"name\":\"Rony\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/40163fe1eb49d5eddd81954e8ad5122633e141df15b0733d07fbe4a156688ba5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/40163fe1eb49d5eddd81954e8ad5122633e141df15b0733d07fbe4a156688ba5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/40163fe1eb49d5eddd81954e8ad5122633e141df15b0733d07fbe4a156688ba5?s=96&d=mm&r=g\",\"caption\":\"Rony\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/cloudsurph\"],\"url\":\"https:\\\/\\\/www.cloudsurph.com\\\/author\\\/ron\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Custom Post Types in WordPress without using Plugin","description":"How to Create Custom Post Types in WordPress without using Plugin, How 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.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/","og_locale":"en_US","og_type":"article","og_title":"Create Custom Post Types in WordPress without using Plugin","og_description":"How to Create Custom Post Types in WordPress without using Plugin, How to Create Custom Post Types in WordPress","og_url":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/","og_site_name":"Cloudsurph Web Hosting Washington D.C.","article_publisher":"https:\/\/www.facebook.com\/CloudSurph\/","article_published_time":"2022-07-16T17:53:55+00:00","article_modified_time":"2022-07-23T13:20:20+00:00","og_image":[{"width":1264,"height":760,"url":"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg","type":"image\/jpeg"}],"author":"Rony","twitter_card":"summary_large_image","twitter_creator":"@cloudsurph","twitter_site":"@Cloud_Surph","twitter_misc":{"Written by":"Rony","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/#article","isPartOf":{"@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/"},"author":{"name":"Rony","@id":"https:\/\/www.cloudsurph.com\/#\/schema\/person\/ac9b4dd136d96e50d5f29c560191e7ed"},"headline":"Create Custom Post Types in WordPress without using Plugin","datePublished":"2022-07-16T17:53:55+00:00","dateModified":"2022-07-23T13:20:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/"},"wordCount":487,"publisher":{"@id":"https:\/\/www.cloudsurph.com\/#organization"},"image":{"@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg","keywords":["Best VPS hosting server Maryland","Cheap Cloud Servers","Cheap Storage Server Hosting","Cheapest VPS","Dedicated Server Hosting in Washington D.C","Speed test VPS"],"articleSection":["Theme Customization","Web Hosting","WordPress","WordPress Theme","WP Custom Theme","WP Theme Options"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/","url":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/","name":"Create Custom Post Types in WordPress without using Plugin","isPartOf":{"@id":"https:\/\/www.cloudsurph.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/#primaryimage"},"image":{"@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg","datePublished":"2022-07-16T17:53:55+00:00","dateModified":"2022-07-23T13:20:20+00:00","description":"How to Create Custom Post Types in WordPress without using Plugin, How to Create Custom Post Types in WordPress","breadcrumb":{"@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/#primaryimage","url":"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg","contentUrl":"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2022\/07\/How-to-Create-Custom-Post-Types-in-WordPress-without-using-Plugin.jpg","width":1264,"height":760},{"@type":"BreadcrumbList","@id":"https:\/\/www.cloudsurph.com\/create-custom-post-types-in-wordpress-without-using-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cloudsurph.com\/"},{"@type":"ListItem","position":2,"name":"Create Custom Post Types in WordPress without using Plugin"}]},{"@type":"WebSite","@id":"https:\/\/www.cloudsurph.com\/#website","url":"https:\/\/www.cloudsurph.com\/","name":"Cloudsurph Web Hosting Washington D.C.","description":"Dedicated Server Hosting","publisher":{"@id":"https:\/\/www.cloudsurph.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cloudsurph.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.cloudsurph.com\/#organization","name":"CloudSurph Technology Solutions","url":"https:\/\/www.cloudsurph.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cloudsurph.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2016\/04\/cloudsurph-logo.png","contentUrl":"https:\/\/www.cloudsurph.com\/wp-content\/uploads\/2016\/04\/cloudsurph-logo.png","width":2348,"height":1692,"caption":"CloudSurph Technology Solutions"},"image":{"@id":"https:\/\/www.cloudsurph.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/CloudSurph\/","https:\/\/x.com\/Cloud_Surph"]},{"@type":"Person","@id":"https:\/\/www.cloudsurph.com\/#\/schema\/person\/ac9b4dd136d96e50d5f29c560191e7ed","name":"Rony","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/40163fe1eb49d5eddd81954e8ad5122633e141df15b0733d07fbe4a156688ba5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/40163fe1eb49d5eddd81954e8ad5122633e141df15b0733d07fbe4a156688ba5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/40163fe1eb49d5eddd81954e8ad5122633e141df15b0733d07fbe4a156688ba5?s=96&d=mm&r=g","caption":"Rony"},"sameAs":["https:\/\/x.com\/cloudsurph"],"url":"https:\/\/www.cloudsurph.com\/author\/ron\/"}]}},"_links":{"self":[{"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/posts\/5216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/comments?post=5216"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/posts\/5216\/revisions"}],"predecessor-version":[{"id":5219,"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/posts\/5216\/revisions\/5219"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/media\/5217"}],"wp:attachment":[{"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/media?parent=5216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/categories?post=5216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudsurph.com\/wp-json\/wp\/v2\/tags?post=5216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}