This seems to be a popular issue and I assure you that I have looked through several solutions. I'm encountering some issues with the URL that my categories are creating. I have categories set up like so:

  • Parent
    • Child 1
      • Child 1a
      • Child 1b
    • Child 2
      • Child 2a
      • Child 2b
      • Child 2c

I'd like for my URLs to look like so: mysite.com/parent/child1/child1a

Instead, my URLs look like this: mysite.com/category/parent/child1/child1a

I can remove category from the URL if I have the following settings in Permalinks: Custom Structure: mysite.com/%category%/%postname%/ Category Base: .

If I use this method, the URL looks the way I want it to and the page loads correctly, but it seems like this method is not appropriate for Wordpress 4.6+. Is this still true? This method also uses a strange Category template (which displays every subcategory item) for the following URL path: mysite.com/category/parent.

I've also tried using the Yoast plugin's Category URLS setting to Remove. This does the same thing as the previously described solution.

What would be the best solution for creating URLs without the category text and how should I fix this Category template issue?

  • Correct me if I am wrong but your strange Category template is probably the archive.php template file? And we are already up to WP v5.3.1 and if your WP is up to date and works as wished by using the dot as category base then I absolutely don't understand what the issue is. Using code(function) or a plugin to check which template is facing you would solve also your question about what is showing on the front-end. (Looking at an answer from 2016 and not knowing yourself if it is true(at all) and/or updated/fixed, is looking for some that maybe not even exist. Don't start haunting ghosts) – Charles Dec 14 '19 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.