Categories

Featured templates

CherryFramework 4. How to change custom post type slug

Andre Flores June 14, 2016
Rating: 5.0/5. From 2 votes.
Please wait...

Hello! This video tutorial shows how to change custom post type slug in CherryFramework 4 templates.

There are standard custom post type slugs in Monstroid templates, e.g. “services-view” for Services posts,portfolio-view” for Portfolio posts, “team-view” for Team posts etc.

You may want to change the custom post slug to match your desire.

Let’s lean how to do this.

Let’s say you want to change the “team-view” slug for Team posts to “our-team”:

monstroid_change_custom_post_type_slug_1

The tutorial assumes you are already logged in to your WordPress dashboard.

  1. Navigate to the Appearance ->Editor tab:

    monstroid_change_custom_post_type_slug_2
  2. Then click on the Theme Functions (functions.php) file title at the right hand side:

    monstroid_change_custom_post_type_slug_3
  3. Scroll down to the very end of the file and add the following code right before the closing PHP tag:

    			add_filter( 'cherry_team_post_type_args', 'monstroid_filter_team_params' );
    			function monstroid_filter_team_params( $args )
    			{ $args['rewrite']['slug'] = 'our-team'; return $args; }
    		
  4. monstroid_change_custom_post_type_slug_4
  5. Click on the Update File” button to apply changes.

Note! In order to have the actual slug changed on your front-end you need to “refresh” the permalinks:

  1. Navigate to the Settings ->Permalinks tab:

    monstroid_change_custom_post_type_slug_5
  2. Simply click “Save Changes” button:

    monstroid_change_custom_post_type_slug_6
  3. Navigate to your site frontend and check the Team post type page. You can see the slug has been successfully changed:

    monstroid_change_custom_post_type_slug_7

This is the end of the tutorial. Now you know how to change the custom post type slug in your CherryFramework 4 template.

Feel free to check the detailed video tutorial below:

CherryFramework 4. How to change custom post type slug
Wordpress Website Design Templates
This entry was posted in Monstroid Tutorials, WordPress Tutorials and tagged CherryFramework4, custom post type, links, slug. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket