Changing Directory Structure (4 posts)

  1. titan21
    Posted 3 years ago #

    Is there a way of prefixing blog posts with a custom directory structure so that, for example, an article relating to cakes would be permalinked with:


    I know if you set a category with a post, you can set the permalinks to display the category before the blog post name but what if a blog post has more than one category attached to it?

  2. mar1965
    Posted 3 years ago #

    Hi there titan21!

    Check out this article in the Codex regarding Taxonomies. Categories are an example of a taxonomy, but there are others. The Custom Taxonomies might help you (although I wouldn't recommend the plugin referenced).

  3. titan21
    Posted 3 years ago #

    Perfect! Thank you.

    I also found this article which gave me a bit more info on using the new taxonomy in permalinks.

    I'm kinda thinking that I don't really need the in-built category functionality so I'll look at making that unavailable at some point.

    One issue I have come across however. I was using the category cake previously as in my example above. But when I define something as "cake" with my new taxonomy, my permalinks use "cake-2". I even tried deleting the category "cake" to see if that would fix things but no joy. Is there a way to "flush" the categories so this doesn't happen and also, why would one taxonomy have a bearing on another taxonomy?

  4. mar1965
    Posted 3 years ago #


    Is there a previous post that used that category "cake" as a slug that you might have deleted? If it's still in the Trash, that might be the cause. If that is the case, try deleting the trash permanently.

Topic Closed

This topic has been closed to new replies.

About this Topic