{"id":132,"date":"2020-09-21T18:31:42","date_gmt":"2020-09-21T18:31:42","guid":{"rendered":"https:\/\/docs.softhopper.studio\/anno\/?post_type=ht_kb&#038;p=132"},"modified":"2020-09-21T18:31:51","modified_gmt":"2020-09-21T18:31:51","slug":"rewrite-url","status":"publish","type":"ht_kb","link":"https:\/\/docs.softhopper.studio\/anno\/knowledge-base\/rewrite-url\/","title":{"rendered":"Rewrite URL"},"content":{"rendered":"\n<p>For changing the rewrite URL you need to know about the development. If you don\u2019t have any coding experience then avoid this part. Here is a beautiful article to rewrite URL. check this and read it carefully.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/code.tutsplus.com\/articles\/the-rewrite-api-post-types-taxonomies--wp-25488\">https:\/\/code.tutsplus.com\/articles\/the-rewrite-api-post-types-taxonomies\u2013wp-25488<\/a><\/li><li><a href=\"https:\/\/wordpress.org\/support\/topic\/taxonomy-rewrite-same-as-custom-post-type-slug\/\">https:\/\/wordpress.org\/support\/topic\/taxonomy-rewrite-same-as-custom-post-type-slug\/<\/a><\/li><\/ul>\n\n\n\n<p>Or you can do it with some plugin like \u2013&nbsp;<a href=\"https:\/\/wordpress.org\/plugins\/wp-better-permalinks\/\">https:\/\/wordpress.org\/plugins\/wp-better-permalinks\/<\/a><\/p>\n\n\n\n<p>Also if you don\u2019t want to go with this then here is another tips for you. For apply this thing you need to install materia-child theme then you can added this code into materia-child&nbsp;<strong>function.php<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    \/*\n    CHANGE SLUGS OF CUSTOM POST TYPES\n    *\/\n    function change_post_types_slug( $args, $post_type ) {\n       \/*item post type slug*\/   \n       if ( 'portfolio' === $post_type ) {\n          $args&#91;'rewrite']&#91;'slug'] = 'projects'; \/\/Your URLs\n       }\n\n       return $args;\n    }\n    add_filter( 'register_post_type_args', 'change_post_types_slug', 10, 2 );\n\n    \/*\n    CHANGE SLUGS OF TAXONOMIES, slugs used for archive pages\n    *\/\n    function change_taxonomies_slug( $args, $taxonomy ) {\n\n       \/*item category*\/\n       if ( 'portfolio-category' === $taxonomy ) {\n          $args&#91;'rewrite']&#91;'slug'] = 'locations'; \/\/Your Ctegory URLs\n       }\n\n       return $args;\n    }\n    add_filter( 'register_taxonomy_args', 'change_taxonomies_slug', 10, 2 );<\/code><\/pre>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht_kb_category":[7],"ht_kb_tag":[],"class_list":["post-132","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-miscellaneous"],"_links":{"self":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/comments?post=132"}],"version-history":[{"count":2,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb\/132\/revisions"}],"predecessor-version":[{"id":134,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb\/132\/revisions\/134"}],"wp:attachment":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/media?parent=132"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb_category?post=132"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb_tag?post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}