Forums

/%category%/%postname%/ to show only parent (top level) category? (4 posts)

  1. ceeee
    Member
    Posted 2 years ago #

    Hello,
    I've upgraded my site from 2.0 to 2.2 last night, and now the /%category%/%postname%/ permalinks which I had set are acting a bit different. Apparently they're actually acting as they should, but I'd like to put them back to how they were before upgrade.

    Before upgrading, my URLs looked like this:
    http://www.mysite.com/category-parent/postname/

    now they look like this:
    http://www.mysite.com/category-parent/sub-category/postname/

    I'd like to get rid of the sub-category, and only show the parent. Is this possible?

    Thanks!

  2. ceeee
    Member
    Posted 2 years ago #

    Actually going to this type of URL:

    http://www.mysite.com/category-parent/postname/

    works... it does give me the correct page. But calling the_permalink() in my template is what has changed. That's what now gives me the sub-category.

  3. ceeee
    Member
    Posted 2 years ago #

    Is there any way to hack the_permalink() to show only the top level category?? I can't figure it out.

  4. Sparanoid
    Member
    Posted 2 years ago #

    anyone can solve it? i also want the permalinks like this

Topic Closed

This topic has been closed to new replies.

About this Topic