Permalinks w/ parent category only (1 post)

  1. ryanve
    Posted 4 years ago #

    Is there a variable like %category& that gives just the parent category?

    I'm building a site for an art gallery and my category structure is something like:

    Artwork (parent)
    - Abstract (child)
    - Figurative (child)
    - Drawings (child)
    News (parent)

    I've set the custom permalink structure to:

    which for a post in the Drawings category would deliver a url like:

    But I really only want the parent category to be part of the url. Ideally I'd like them to be:

    Of course it's possible to set the permalink structure to:

    which would be fine except that then posts in News would appear as
    rather than

    Any ideas?

    @ admin: I first tried to post this a few min. earlier in the same place (How To...) but with the title "Permalinks w/ parent %category% only" but the % sign made the post not accessible. Please delete that one and keep this one.

Topic Closed

This topic has been closed to new replies.

About this Topic