Hello,
We apologize for the issue you are facing with the "Strip Category Base" feature in Rank Math. The "Strip Category Base" option primarily affects the category archive URLs for standard post types and does not directly apply to custom post types created via plugins like ACF.
To achieve the URL transformation you desire (from domain.com/slug/postname
to domain.com/postname
), you may need to customize the permalink structure for your custom post types. Here’s a general approach you can take:
-
Custom Post Type Registration: When registering your custom post type, ensure that you set the rewrite
argument correctly. For example:
register_post_type('movies', array(
'rewrite' => array('slug' => ''),
// other arguments
));
This will remove the base slug from the URL.
-
Flush Rewrite Rules: After making changes to your custom post type registration, make sure to flush the rewrite rules. You can do this by visiting the Settings → Permalinks page in your WordPress dashboard and simply clicking Save Changes.
-
Rank Math Settings: Ensure that you have enabled the appropriate settings in Rank Math for handling permalinks and redirections if necessary.
If you continue to experience issues or need further assistance, please reply to this ticket with your site URL, and a human agent from our support team will be happy to assist you further.
Thank you for raising this concern!
Sources:
How to Remove the Category Base From WordPress » Rank Math
WordPress Permalink Structure & Changing Individual URLs » Rank Math
Hello,
Thank you for contacting us and bringing your concern to our attention.
The “Strip Category Base” option in Rank Math only works with the WordPress default categories which removes the /category/
slug from the default categories.
Unfortunately, it will not work on the CPT. In this case, if you want, you can use a plugin like Permalink Manager to change the permalink of your CPT.
Please don’t hesitate to let us know if you have any other questions.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.