Permalinks: Having only subcategory as *category* ?

  • Unknown's avatar

    (THIS IS MY 2ND THREAD: The first one had %category% in the title, so I can’t enter it, I assume that’s why, so I think anybody else might not be able to do so, either?)

    Hi guys,

    I’m using %category% in my permalinks, to get some more keywords in the URL, rather than a “useless” date

    This is the setup I have:

    /%year%/%category%/%postname%

    I have %year% first as WordPress recommends NOT to use a text string as the first part (some database performance thing later on).

    Anyway – it works great, but if I publish a post in the “Sony Ericsson”-subcategory, which is under its parent “Mobiles”, then the permalink will look like this:

    /2009/mobiles/sony-ericsson-mobiles/%postname%

    I don’t need both “mobiles” (the parent) and “sony-ericsson-mobiles” (subcategory+parent) in the URL, the latter would be enough. The subcategory I posted in was in fact just “Sony Ericsson”, so I assume the “-mobiles” is added because that’s the parent.

    Any way to remove the parent categories from %category% and only use the category actually selected for the post?

    Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The blog you specified at techpatio.com does not appear to be hosted at WordPress.com.

    This support forum is for WordPress.com hosted blogs only. If you have a self-hosted WordPress blog you need to seek help at the WordPress.org forums, not here.

    If you don’t understand the difference, you may find this information helpful.

  • Unknown's avatar

    HI thuesen,

    You can try this /%category%/%child-category%/%postname%/.

    Let me know what you face.

    Regards,
    R.Gopinath

    http://blogs.neuronring.com

  • The topic ‘Permalinks: Having only subcategory as *category* ?’ is closed to new replies.