{"id":6261,"date":"2025-03-28T20:07:40","date_gmt":"2025-03-28T11:07:40","guid":{"rendered":"https:\/\/cooss.net\/jetengine-cpt-settings-and-search-engine-indexing-en\/"},"modified":"2025-04-03T21:43:15","modified_gmt":"2025-04-03T12:43:15","slug":"jetengine-cpt-settings-and-search-engine-indexing-en","status":"publish","type":"post","link":"https:\/\/cooss.net\/en\/jetengine-cpt-settings-and-search-engine-indexing-en\/","title":{"rendered":"JetEngine CPT Register Query Var and Search Engine Indexing"},"content":{"rendered":"\n<p>Settings related to JetEngine&#8217;s CPT (Custom Post Type) such as &#8220;Register Query Var&#8221; and &#8220;Rewrite&#8221; options affect URL structure and search engine indexing. Let&#8217;s summarize the meaning of each setting and explore how they can be utilized.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Post Type<\/h2>\n\n\n\n<p>&#8220;Post type&#8221; is a concept that distinguishes the <strong>type<\/strong> of content in WordPress.<\/p>\n\n\n\n<p>If we think of WordPress as a <strong>content warehouse<\/strong>, &#8220;Post type&#8221; can be considered as the \u2018types of content boxes\u2019 within the warehouse. WordPress internally distinguishes and uses Post Types as follows.<\/p>\n\n\n\n<p>At the most basic level, it divides into &#8220;Page&#8221; and &#8220;Post&#8221;, where &#8220;Page&#8221; is used to store HTML code for web pages, and &#8220;Post&#8221; is used for the purpose of storing typical &#8216;articles&#8217; that express content between the Header\/Footer design of a webpage, such as blogs and articles. If you install WooCommerce to operate a shopping mall with WordPress, you define and use an additional Post Type called &#8216;product&#8217;.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ud83d\udcc4 <code>post<\/code> = Blog post box<\/li>\n\n\n\n<li>\ud83d\udcc3 <code>page<\/code> = Static information (introduction\/inquiry, etc.) box<\/li>\n\n\n\n<li>\ud83d\udcf7 <code>attachment<\/code> = Image or file box<\/li>\n\n\n\n<li>\ud83d\uded2 <code>product<\/code> = Shopping mall product box (e.g., WooCommerce)<\/li>\n\n\n\n<li>\ud83c\udfac <code>movie<\/code> = Movie information box (custom CPT)<\/li>\n<\/ul>\n\n\n\n<p>Isn&#8217;t it a question whether site operators or developers can define Post Types for other purposes? You can define and use Post Types for other purposes, and this is called &#8216;Custom Post Type (CPT)&#8217;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Custom Post Type<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Why is it needed? (Why)<\/h3>\n\n\n\n<p>Basic WordPress provides two types of content: <code>Post<\/code> and <code>Page<\/code>. However, in the following cases, this may not be sufficient:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When you want to handle content such as <strong>products, portfolios, events, reviews, movies, lectures<\/strong> that are not blog posts<\/li>\n\n\n\n<li>When each type of content requires <strong>unique fields, design, management methods<\/strong><\/li>\n\n\n\n<li>When you want to separate specific content for <strong>management, classification, output<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udccc Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Movie review site \u2192 Create Movie (Movie) CPT, Actor (Actor) CPT<\/li>\n\n\n\n<li>Education platform \u2192 Create Lesson (Lesson) CPT, Teacher (Teacher) CPT<\/li>\n\n\n\n<li>Company website \u2192 Portfolio (Portfolio), Project (Project)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Who uses it? (Who)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Web developers or web agencies<\/li>\n\n\n\n<li>Designers who need WordPress customization<\/li>\n\n\n\n<li>Marketing teams wanting to segment content<\/li>\n\n\n\n<li>Startups or companies wanting to create function-centered websites<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">When is it used? (When)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When the site requires <strong>multiple types of content<\/strong><\/li>\n\n\n\n<li>When each content requires <strong>custom fields, templates, classification criteria<\/strong><\/li>\n\n\n\n<li>When creating <strong>professional features<\/strong> linked with REST API, custom admin screens, etc.<\/li>\n\n\n\n<li>When creating advanced sites with Elementor, JetEngine, ACF, etc.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How to define it<\/h3>\n\n\n\n<p>Web developers can define it in various ways. CPT uses the database structure that WordPress uses for data storage, simply distinguishing the values recorded in the post_type field of the wp_posts table as &#8216;page&#8217;, &#8216;post&#8217;, &#8216;attachment&#8217;, etc.<\/p>\n\n\n\n<p>Usually, you can use a well-made plugin. At COOSS.NET, we easily define Custom Post Types using <a href=\"https:\/\/crocoblock.com\/?ref=882\" target=\"_blank\" rel=\"noopener\"><strong>Crocoblock<\/strong><\/a>&#8216;s <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/?ref=882\" target=\"_blank\" rel=\"noopener\"><strong>JetEngine<\/strong><\/a>.<\/p>\n\n\n\n<p>For example, at COOSS.NET, we have designated &#8216;AI trading opinions on coins&#8217; as a separate Post Type named &#8216;buysell-coin&#8217;. The purpose is to display it differently from ordinary articles, such as <strong>[ <a href=\"https:\/\/cooss.net\/buysell-coin\/btc-25-03-28-02-00\/\">BTC AI Trading &#8211; Reasons for Buy\/Sell\/Hold Decision on 2025-03-28<\/a> ]<\/strong>, and it&#8217;s also more manageable as a separate Post Type.<\/p>\n\n\n\n<p>Below is the dialog box for defining CPT in <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/?ref=882\" target=\"_blank\" rel=\"noopener\"><strong>JetEngine<\/strong><\/a>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"972\" height=\"517\" src=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-14.png\" alt=\"\" class=\"wp-image-6218\" title=\"\" srcset=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-14.png 972w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-14-300x160.png 300w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-14-768x408.png 768w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-14-600x319.png 600w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding JetEngine&#8217;s Post Type Settings<\/h2>\n\n\n\n<p>In this article, we will take a deeper look at the &#8220;Register Query Var&#8221; and &#8220;Rewrite&#8221; settings when setting up Custom Post Types (CPT).<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"853\" height=\"275\" src=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-15.png\" alt=\"\" class=\"wp-image-6224\" title=\"\" srcset=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-15.png 853w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-15-300x97.png 300w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-15-768x248.png 768w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/image-15-600x193.png 600w\" sizes=\"(max-width: 853px) 100vw, 853px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">What is Register Query Var?<\/h3>\n\n\n\n<p><strong>Register Query Var<\/strong> connects with WordPress&#8217;s internal query system. It allows identifying or filtering post types through specific variables in the URL query string.<\/p>\n\n\n\n<p>When this option is activated, it becomes possible to retrieve CPT via URL requests.<\/p>\n\n\n\n<p>For example, you can display posts in the following address format by adding a query variable after the ?.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#047;&#047;example.com\/?your_post_type_slug=post_slug<\/code><\/pre>\n\n\n\n<p><em>Taking COOSS.NET as an example, addresses in the following form will also work. (Click to see).<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/cooss.net\/?buysell-coin=btc-25-03-28-02-00\"><code>https:\/\/cooss.net\/?buysell-coin=btc-25-03-28-02-00<\/code><\/a><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Register Query Var in JetEngine Settings<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Impact when activated<\/h4>\n\n\n\n<p>When Register Query Var is activated:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The internal query system recognizes the post type in the address bar.<\/li>\n\n\n\n<li>Thanks to this, direct queries using URL parameters or access via WP_Query become possible.<\/li>\n<\/ul>\n\n\n\n<p>It can be called in PHP code as follows,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>$query = new WP_Query( &#091;\n'my_custom_post_type' =&gt; 'post_slug'\n] );<\/code><\/code><\/pre>\n\n\n\n<p><br>In the address bar, you can display the post with the following address.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/cooss.net\/?buysell-coin=btc-25-03-28-02-00\">https:\/\/cooss.net\/?buysell-coin=btc-25-03-28-02-00<\/a>\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Impact when deactivated<\/h4>\n\n\n\n<p>If deactivated, you will not be able to use query variables for that post type, making direct queries through URL or WP_Query impossible. Generally, if the CPT can only be accessed through REST API, registering query_var may not be necessary.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is Rewrite Setting?<\/h3>\n\n\n\n<p><strong>Rewrite<\/strong> options are used to generate easily memorable URLs. This provides a URL structure that is friendly to both search engines and users.<\/p>\n\n\n\n<p>For example, when the Rewrite setting is activated, you can also access the post with the following path.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#047;&#047;domain.com\/post_type_slug\/post_slug<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Necessity of Rewrite Setting<\/h4>\n\n\n\n<p>If there is no Rewrite setting, you will have to use URLs like `https:\/\/domain.com\/?post_type=post_type_slug&amp;p=post_id` by default, which is disadvantageous from a search engine optimization perspective.<\/p>\n\n\n\n<p><em>At COOSS.NET, we initially did not activate this option. However, upon seeing the indexed pages in search engines, we noticed that search engines were recording them as &#8216;https:\/\/domain.com\/post_type_slug\/post_slug`. When we clicked this address, WordPress could not recognize it, displaying an error message indicating that the page does not exist. Now, by also activating the Rewrite setting, both query-type addresses and the addresses indexed by search engines are outputting correctly.<\/em><\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-width wp-block-button__width-100\"><a class=\"wp-block-button__link has-vivid-purple-background-color has-background wp-element-button\" href=\"https:\/\/cooss.net\/jetengine\uc758-custom-post-type-\uc124\uc815\uc5d0\uc11c-rewrite-slug\/\" style=\"border-radius:10px\">Introduction and Utilization of Rewrite Slug in JetEngine&#8217;s Custom Post Type Settings<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Comprehensive Utilization of the Two Settings<\/h2>\n\n\n\n<p>While checking for errors in how search engines index, I thought it was necessary to understand how to combine each setting effectively and decided to summarize it.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Concept Summary<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>Register Query Var<\/code> <\/strong>: Allows access via query string in the format of <code>\/?post_type_slug=slug-name<\/code><\/li>\n\n\n\n<li><strong><code>Rewrite<\/code> <\/strong>: Allows permalinks in the format of <code>\/post_type_slug\/slug-name<\/code> (URL rewriting)<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Setting Combinations (Query Var + Rewrite)<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On + On : Query method + hierarchical Permalink support <strong>(suitable for most public CPTs)<\/strong><\/li>\n\n\n\n<li>Off + On : <s>Query method<\/s> + hierarchical Permalink support <strong>(<\/strong> suitable for public websites)<\/li>\n\n\n\n<li>On + Off : Query method + <s>hierarchical Permalink support<\/s> (for development, testing CPT)<\/li>\n\n\n\n<li>Off + Off : <s>Query method + hierarchical Permalink support<\/s> (for admin, internal system CPT)<\/li>\n<\/ul>\n\n\n\n<p>You can refer to this table to adjust settings according to the needs of each site.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Recommendations Based on Situations (Query Var + Rewrite)<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">\u2705 <strong>1. Public content such as blogs, portfolios, products, announcements<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On + On<\/li>\n\n\n\n<li>User-friendly URL + flexible query access \u2192 Search engine indexing works smoothly<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>https:\/\/yourdomain.com\/portfolio\/my-design<br>https:\/\/yourdomain.com\/?portfolio=my-design<br><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u2705 <strong>2. CPT for admin-only data storage<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Off + Off<\/li>\n\n\n\n<li>CPT for storing system logs, internal API results, etc.\n<ul class=\"wp-block-list\">\n<li>Block external access<\/li>\n\n\n\n<li>Use only for REST API or backend<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">\u2705 <strong>3. REST API exclusive CPT<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Off + Select depending on the situation<\/li>\n\n\n\n<li>Prevent unnecessary path exposure if only utilized for REST<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>In conclusion, for <strong>most general public CPTs, setting both to On is the most flexible and safe<\/strong>, while for <strong>internal-only<\/strong> or <strong>API-only<\/strong> CPTs, it is better to deactivate them based on purpose to prevent unnecessary exposure for security and performance.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cautions<\/h2>\n\n\n\n<p>After setting <strong>Rewrite On<\/strong>, you must click <strong>&#8220;Save Changes&#8221;<\/strong> once on the <strong>Permalink settings page<\/strong> without changing anything.<\/p>\n\n\n\n<p>The above settings are specified in <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/?ref=882\" target=\"_blank\" rel=\"noopener\"><strong>JetEngine<\/strong><\/a>, but the application of Rewrite rules follows WordPress management, and only after doing this will the rewrite rules be registered in WordPress.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"margin-top: 100px;margin-bottom: 30px;border-top: 1px solid #ccc\">&nbsp;<\/div>\n\n\n\n<p><b>[Register Query Var] :<\/b> A function that identifies the post type through specific variables in the query string of WordPress URLs.<br><b>[Rewrite] :<\/b> A function that modifies the URL structure to a user-friendly format.<br><b>[404 Error] :<\/b> An error message that occurs when the requested page does not exist.<br><b>[Google Search Console] :<\/b> A tool by Google for monitoring the performance and indexing status of a website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Settings related to JetEngine&#8217;s CPT (Custom Post Type) such as &#8220;Register Query Var&#8221; and &#8220;Rewrite&#8221; options affect URL structure and search engine indexing. Let&#8217;s summarize the meaning of each setting and explore how they can be utilized. What is Post Type &#8220;Post type&#8221; is a concept that distinguishes the type of content in WordPress. If [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[175],"tags":[],"class_list":["post-6261","post","type-post","status-publish","format-standard","hentry","category-crocoblock-en"],"_links":{"self":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/posts\/6261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/comments?post=6261"}],"version-history":[{"count":3,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/posts\/6261\/revisions"}],"predecessor-version":[{"id":6768,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/posts\/6261\/revisions\/6768"}],"wp:attachment":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/media?parent=6261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/categories?post=6261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/tags?post=6261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}