How to easily remove the base slug for custom post type URLs

  • ACPT

in this tutorial we will cover the process of removing the base slug from custom post type URLs, aiming to simplify and optimize the structure of permalinks.

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.

Screenshot of an admin dashboard displaying registered custom post types, featuring options like view, edit, duplicate, and delete for the "properties" post type.

To remove the base slug using the ACPT plugin, follow these steps:

  1. Go to your ACPT settings.
  2. Click on Custom Post Type.
  3. 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.

Screenshot of ACPT plugin interface showing Edit Custom Post Type page with a focus on the Settings tab. Options for post name, singular label, icon, and visibility settings are visible.

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.

Screenshot of the ACPT plugin's "Edit Custom Post Type" settings page, showing various toggle options and fields like "Hierarchical," "Private," and "Front URL prefix.

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!

Settings page of a software application with options for language, number of items per page, and content settings. A red box highlights "Flush the ACPT cache" under the performance section.

ACPT Version : Version 2.0.19

LogoCreated with Sketch.

Bricks Version : Version 1.11.1.1

If you haven't purchased ACPT yet and are planning to, we'd appreciate it if you use our affiliate link. It costs you nothing extra and helps us continue to deliver quality content.