{"id":72100,"date":"2016-06-14T09:26:34","date_gmt":"2016-06-14T13:26:34","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=72100"},"modified":"2016-07-11T04:52:32","modified_gmt":"2016-07-11T08:52:32","slug":"cherryframework-4-how-to-change-custom-post-type-slug","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/cherryframework-4-how-to-change-custom-post-type-slug.html","title":{"rendered":"CherryFramework 4. How to change custom post type slug"},"content":{"rendered":"<p>Hello! This video tutorial shows how to change <strong>custom post type slug<\/strong> in CherryFramework 4 templates.<\/p>\r\n <div class=\"video-container\">\r\n\t<iframe src=\"https:\/\/www.youtube.com\/embed\/woqtYjRupro\"><\/iframe>\r\n<\/div>\r\n<p>There are standard custom post type slugs in Monstroid templates, e.g.<strong> &#8220;services-view&#8221;<\/strong> for Services posts,<strong> &#8220;portfolio-view&#8221;<\/strong> for Portfolio posts, <strong>&#8220;team-view&#8221;<\/strong> for Team posts etc.<\/p>\r\n<p>You may want to change the custom post slug to match your desire.<\/p>\r\n<p>Let&#8217;s lean how to do this.<\/p>\r\n<p>Let&#8217;s say you want to change the <strong>&#8220;team-view&#8221;<\/strong> slug for Team posts to <strong>&#8220;our-team&#8221;<\/strong>:<\/p>\r\n\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_1-300x171.png\" alt=\"monstroid_change_custom_post_type_slug_1\" width=\"300\" height=\"171\" class=\"alignnone size-medium wp-image-72101\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_1-300x171.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_1-150x85.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_1-1024x583.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_1.png 1150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<p>The tutorial assumes you are already logged in to your WordPress dashboard.<\/p>\r\n<ol>\r\n\t<li>\r\n\t\t<p>Navigate to the <strong>Appearance ->Editor<\/strong> tab:<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_2-300x170.png\" alt=\"monstroid_change_custom_post_type_slug_2\" width=\"300\" height=\"170\" class=\"alignnone size-medium wp-image-72102\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_2-300x170.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_2-150x85.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_2-1024x579.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_2.png 1247w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li>\r\n\t<li>\r\n\t\t<p>Then click on the <strong>Theme Functions (functions.php)<\/strong> file title at the right hand side:<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_3-300x169.png\" alt=\"monstroid_change_custom_post_type_slug_3\" width=\"300\" height=\"169\" class=\"alignnone size-medium wp-image-72103\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_3-300x169.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_3-150x85.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_3-1024x578.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_3.png 1247w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Scroll down to the very end of the file and add the following code right before the closing <strong>PHP<\/strong> tag:<\/p>\r\n\t\t<pre class=\"brush:php\">\r\n\t\t\tadd_filter( 'cherry_team_post_type_args', 'monstroid_filter_team_params' );\r\n\t\t\tfunction monstroid_filter_team_params( $args )\r\n\t\t\t{ $args['rewrite']['slug'] = 'our-team'; return $args; }\r\n\t\t<\/pre>\r\n\t<\/li>\r\n\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_4.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_4-300x169.png\" alt=\"monstroid_change_custom_post_type_slug_4\" width=\"300\" height=\"169\" class=\"alignnone size-medium wp-image-72104\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_4-300x169.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_4-150x85.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_4-1024x578.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_4.png 1247w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t\r\n\t<li>\r\n\t\t<p>Click on the <strong>&#8220;Update File&#8221;<\/strong> button to apply changes.<\/p>\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 front-end you need to<strong> &#8220;refresh&#8221;<\/strong> the <strong>permalinks<\/strong>:<\/p>\r\n<ol>\r\n\t<li>\r\n\t\t<p>Navigate to the <strong>Settings ->Permalinks<\/strong> tab:<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_5.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_5-300x165.png\" alt=\"monstroid_change_custom_post_type_slug_5\" width=\"300\" height=\"165\" class=\"alignnone size-medium wp-image-72105\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_5-300x165.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_5-150x82.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_5-1024x563.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_5.png 1247w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Simply click <strong>&#8220;Save Changes&#8221;<\/strong> button:<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_6.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_6-300x165.png\" alt=\"monstroid_change_custom_post_type_slug_6\" width=\"300\" height=\"165\" class=\"alignnone size-medium wp-image-72106\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_6-300x165.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_6-150x83.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_6-1024x563.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_6.png 1247w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Navigate to your site frontend and check the <strong>Team post type<\/strong> page. You can see the slug has been successfully changed:<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_7.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_7-300x191.png\" alt=\"monstroid_change_custom_post_type_slug_7\" width=\"300\" height=\"191\" class=\"alignnone size-medium wp-image-72107\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_7-300x191.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_7-150x96.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_7-1024x653.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/monstroid_change_custom_post_type_slug_7.png 1144w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<\/ol>\r\n<p>This is the end of the tutorial. Now you know how to change the <strong>custom post type slug<\/strong> in your CherryFramework 4 template.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=woqtYjRupro?width=1280&amp;height=720\" rel=\"prettyPhoto\">CherryFramework 4. How to change custom post type slug<\/a>","protected":false},"excerpt":{"rendered":"<p>Hello! This video tutorial shows how to change  custom post type slug in CherryFramework 4 templates.<\/p>\n","protected":false},"author":68,"featured_media":72113,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2017,728],"tags":[2012,2308,511,1322],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/72100"}],"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\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=72100"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/72100\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/72113"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=72100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=72100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=72100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}