When you create a custom post type on your website, it usually uses a URL format like this: yoursite.com/cpt-name/post-name
For instance, if you make a custom post type for properties it will look like yoursite.com/properties/property-1
In numerous scenarios, you might feel the need to remove that base slug. Perhaps you’re aiming for a tidier URL structure, or you might be looking to enhance your site’s SEO performance by doing so. Sometimes, you might think you need an extra plugin like “Remove CPT Base” to get rid of the base slug.
However, if you’re using the ACPT plugin for your custom post types, you probably won’t need to install anything extra. The ACPT plugin can handle this for you! Let’s see how it works.
To remove the base slug using the ACPT plugin, follow these steps:
- Go to your ACPT settings.
- Click on Custom Post Type.
- Find the custom post type you want to edit, Click on Edit next to that post type.
This will take you to the settings page for your custom post type (CPT). Here, you can edit all the details you set when you first created the CPT. You can change things like the name, labels, and other settings related to your custom post type.
Next, click on the Settings tab. This is where you can change the settings for your custom post type. You’ll find options to adjust various aspects of your CPT.
Scroll down until you see the “Front URL prefix” field. By default, this field shows the name of your post type. If you want to change it to something else, just type in your new prefix. If you want to remove it completely, simply erase the default name and leave the field empty.
After you’ve made your changes, make sure to click Save. Then, check to see if the slug for your single post type has been removed. You should now see the updated permalink without the base slug.
Flushing Cache
If you have the ACPT Cache enabled, make sure to clear it. To do this, go to ACPT in the menu bar and click on Settings. From there, you can find the option to flush the cache. This will ensure that your changes are applied correctly!