Keep blog prefix with Strip Category Base feature enabled

#431224
  • Resolved Hey Hey
    Rank Math free

    Hello,

    Is there anyway to use a /blog/ prefix with the category base strip featured enabled? I.e. always have /blog/ before an individual post and the category name?

    Example:
    Blog posts URL: site.com/blog/
    Individual post URL: site.com/blog/top-fruits-blog-post/
    Category page posts URL: site.com/blog/fruit/

    Right now, with the strip feature enabled it does:

    site.com/blog/top-fruits-blog-post/
    site.com/fruit/

    This is using a Permalinks > Custom Structure > /blog/%postname%/ with no Category/Tag base set.

    Without the Strip Category Base feature enabled, it looks like this, which is not desired:
    site.com/blog/top-fruits-blog-post/
    site.com/category/fruit/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with post and category base URL settings.

    Please turn off the strip category base setting, then go to Settings > Permalinks. Under common settings, Use “Custom Structure”: blog/%postname%/ . Under “Optional” change the category base to “Blog”, then click “Save Changes” Screenshot:

    Hope that helps. Please let us know if you have questions.

    Hey Hey
    Rank Math free

    Hi Nigel,

    I appreciate you taking the time. When I do that, it 404s the individual post.

    That’s using /blog/%postname%/ in the Custom Structure, and blog as the Category base.

    Any ideas?

    Nigel
    Rank Math business

    Hello,

    Sorry I did not thoroughly test the settings I shared with you in the previous reply. I checked them on my own setup and got the same results.

    After further research I found that WordPress does not allow categories and posts to have the same base. You may need to choose a different URL structure. There may be another plugin that can achieve the results you want but I found none from my quick research.

    Hope that helps. Please let us know if you have questions.

    Hey Hey
    Rank Math free

    Thanks a lot! I realized it wasn’t specifically a RankMath issue, and I appreciate your follow-through.

    Take care!

    Hello,

    We are super happy that we could address your concern.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this ticket.