{"id":79269,"date":"2017-02-21T10:21:28","date_gmt":"2017-02-21T15:21:28","guid":{"rendered":"https:\/\/www.templatemonster.com\/help\/?p=79269"},"modified":"2017-07-21T06:43:00","modified_gmt":"2017-07-21T10:43:00","slug":"wordpress-blogging-themes-change-custom-post-type-slug","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-blogging-themes-change-custom-post-type-slug.html","title":{"rendered":"WordPress Blogging themes. How to change custom post type slug"},"content":{"rendered":"<p>This tutorial is going to show you how to change custom post type slug in <a href=\"https:\/\/www.templatemonster.com\/blog-wordpress-themes\/\" title=\"WordPress Blogging templates\" target=\"_blank\">WordPress Blogging templates<\/a>.<\/p>\r\n\r\n <div class=\"video-container\">\r\n\t<iframe src=\"https:\/\/www.youtube.com\/embed\/yx2v4jDzULY\"><\/iframe>\r\n<\/div>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/service-center\/\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-3-(835-x100).jpg\" \/>\r\n<\/a>\r\n<\/div>\r\n<p>There are standard custom post type slugs in WordPress Blogging themes, e.g. &#8220;cherry-services&#8221; for Services posts etc.<\/p>\r\n\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_1.jpg\" alt=\"WordPress_Blogging_themes._How_to_change_custom_post_type_slug_1\" width=\"850\" height=\"165\" class=\"alignnone size-full wp-image-79270\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_1.jpg 850w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_1-150x29.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_1-300x58.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_1-768x149.jpg 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/a>\r\n<p>Let&#8217;s say you want to change <strong>&#8220;cherry-services&#8221;<\/strong> to <strong>&#8220;our-services&#8221;<\/strong>. To do that, please, follow the steps listed below:<\/p>\r\n<ol>\r\n\t<li>\r\n\t<p>Log into your WordPress admin panel and navigate to the <strong>Appearance<\/strong> > <strong>Editor<\/strong> page.<\/p>\r\n\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2.jpg\" alt=\"WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2\" width=\"1135\" height=\"765\" class=\"alignnone size-full wp-image-79271\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2.jpg 1135w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2-150x101.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2-300x202.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2-768x518.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_2-1024x690.jpg 1024w\" sizes=\"(max-width: 1135px) 100vw, 1135px\" \/><\/a>\t\r\n\t<\/li>\r\n\t<li>\r\n\t<p>Locate <strong>functions.php<\/strong> file on the right side. Click on it. Once you do that you will see file content in front of you.<\/p>\r\n\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3.jpg\" alt=\"WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3\" width=\"1135\" height=\"755\" class=\"alignnone size-full wp-image-79272\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3.jpg 1135w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3-150x100.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3-300x200.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3-768x511.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_3-1024x681.jpg 1024w\" sizes=\"(max-width: 1135px) 100vw, 1135px\" \/><\/a>\t\r\n\t<\/li>\r\n\t<li><p>Scroll down to the very end of the file and add the following code right before the closing PHP tag:<\/p>\r\n\t\t<pre class=\"brush:php\">add_filter( 'cherry_services_post_type_args', '_my_rewrite_slug' );\r\n\t\t\tfunction _my_rewrite_slug( $args ) {\r\n\t\t\t$args['rewrite']['slug'] = 'our-services';\r\n\t\t\treturn $args;\r\n\t\t}<\/pre>\r\n\t<\/li>\r\n\t<li>\r\n\t<p>Remember to replace <strong>our-services<\/strong> with your new slug.<\/p><\/li>\r\n\t<li><p>Click <strong>Update File<\/strong> button to save the change.<\/p>\r\n\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4.jpg\" alt=\"WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4\" width=\"1135\" height=\"745\" class=\"alignnone size-full wp-image-79273\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4.jpg 1135w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4-150x98.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4-300x197.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4-768x504.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_4-1024x672.jpg 1024w\" sizes=\"(max-width: 1135px) 100vw, 1135px\" \/><\/a>\t\r\n\t<\/li>\r\n<\/ol>\r\n<p class=\"attention\"><strong>Note!<\/strong> In order to have the actual slug changed on your frontend you need to<strong>refresh<\/strong> the <strong>permalinks<\/strong>:<\/p>\r\n\r\n<ol>\r\n\t<li>\r\n\t<p>Open the <strong>Settings<\/strong> > <strong>Permalinks<\/strong> page in your backend.<\/p><\/li>\r\n\t<li>\r\n\t\t<p>Click the <strong>Save Changes<\/strong> button.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5.jpg\" alt=\"WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5\" width=\"1135\" height=\"800\" class=\"alignnone size-full wp-image-79274\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5.jpg 1135w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5-150x106.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5-300x211.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5-768x541.jpg 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2017\/02\/WordPress_Blogging_themes._How_to_change_custom_post_type_slug_5-1024x722.jpg 1024w\" sizes=\"(max-width: 1135px) 100vw, 1135px\" \/><\/a>\t\t\r\n\t<\/li>\r\n<\/ol>\r\n<p>Now you can check your site. Open services post to see successful slug change.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=yx2v4jDzULY?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress Blogging themes. How to change custom post type slug<\/a>","protected":false},"excerpt":{"rendered":"<p>This tutorial is going to show you how to change custom post type slug in WordPress Blogging templates.<\/p>\n","protected":false},"author":55,"featured_media":79278,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[789,1322,2302],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/79269"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=79269"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/79269\/revisions"}],"predecessor-version":[{"id":82161,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/79269\/revisions\/82161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/79278"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=79269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=79269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=79269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}