• Hi,

    I’m attempting to remove the category base using the old trick of going to permalinks, pasting /%category%/%postname%/ in my custom structure and placing a ‘.’ in category base.

    This removes the category base from a couple of my categories but it introduces more issues.

    My blog page, which is my home page, now has the category ‘log’ ADDED to my URL, so my latest post which should be

    https://followtheboat.com/the-most-challenging-sailboat-repair-of-all-time-part-2/

    Is now https://followtheboat.com/log/the-most-challenging-sailboat-repair-of-all-time-part-2/

    Why, if I have removed the category case, is it adding it to a blog posts?

    Furthermore, I would have expected wordpress to associate this new address with the old one, but if I try and hit my old address, it says the page doesn’t exist.

    Moreoever, it removes the category base from my podcast category, but when I hit the archive page with the /category/ part removed, instead of opening the archive page, it downloads a file called 3evaU-zB. If I open this in Notepad, it’s the XML file for my podcast feed.

    I think my best workaround is to leave the category base in, but just remove it from my podcast category since this is the one causing the biggest problems. My old podcast feed was based on the old category structure (ie without /category/ in the name), but with my website revamp my feed now has to include /category/. How can I remove /category/ from the feed address while maintaining an archive page that doesn’t default to the XML file?

    • This topic was modified 11 months, 1 week ago by demonboy.
Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m attempting to remove the category base using the old trick of going to permalinks, pasting /%category%/%postname%/ in my custom structure and placing a ‘.’ in category base.

    This removes the category base from a couple of my categories but it introduces more issues.

    Surely the smart developers who build the WordPress software must have a good reason for adding the category base: so remove it at your own risk.

    And this “old trick” has always had various “old problems”, including 404 errors in several scenarios. Nothing new here.

    Generally, SEO plugins do a better job removing the category base than this “old trick”. I can see the feature is only available in the Basic (paid plan) version of the AIOSEO plugin you’re using: https://aioseo.com/docs/how-to-strip-the-category-base-in-wordpress/

    How can I remove /category/ from the feed address while maintaining an archive page that doesn’t default to the XML file?

    I can see podcast feeds at https://followtheboat.com/podcast/ and https://followtheboat.com/feed/podcast/, and none of these URLs includes /category/. The contend in these two feed addresses is the same (except for the different feed addresses), so that makes me think they’re being generated by the same tool.

    And a “Podcast” post category archive page at https://followtheboat.com/category/podcast/

    Frankly, I don’t understand what problem you’re trying to solve ??

    Thread Starter demonboy

    (@demonboy)

    Hi @gappiah – thanks for getting back to me. You can ignore the podcast part of my post now. I was getting an error with Spotify for my feed but that was an issue at their end, nothing to do with the category issue my end.

    However, the original problem persists. If I remove the /category/ part of my podcast archive page, it is treated as a podcast feed, not as an archive page. I should be able to hit https://mysite.com/podcast/, and it serve up my podcast archive page since ‘podcast’ is a category. It doesn’t, it treats it as the XML for my podcast feed instead.

    The other problem is that when REMOVING the category section in my permalinks, it ADDS the category /log/ to all my blog posts.

    However, the original problem persists. If I remove the /category/ part of my podcast archive page, it is treated as a podcast feed,

    No, that’s not exactly what’s happening.

    As I mentioned above, your site ALREADY has a podcast feed at example.com/podcast/.

    When you remove /category/ from the Podcast category archive URL, you now have two things — the existing podcast feed and the “Podcast” category archive — both competing to use the /podcast/ URL.

    This creates a conflict… and it seems the already existing podcast feed is winning, and the category archive page doesn’t get served at all.

    It’s precisely to avoid such conflicts that the WordPress developers found it necessary to add the category base to category archive URLs.

    If you really want to remove the /category/ prefix from your category archive pages, you first need to free up the existing podcast feed at /podcast/. But I can’t tell you exactly how to do that… because I don’t know how that feed URL came about in the first place.

    Thread Starter demonboy

    (@demonboy)

    Hmmm, yes, that makes sense, thanks. I’ll look into this but I think I’ll probably end up leaving /category/ in the slug afterall. Thanks for your time, much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Removing category base causing problems’ is closed to new replies.