Grow your CSS skills. Land your dream job.

WordPress – Permalinks without nested sub-categories

  • # July 6, 2009 at 4:07 am

    Hi,

    I have searched the web for a couple of days but can’t find a appropriate answer.

    I use a Worpdress link structure like this: %category%/%postname% which results in /category/postname

    But if I have posts in subcategories the Link is like /category/subcategory/postname

    How can I define that the subcategory will NOT appear in the permalink?

    As I mentioned before, I can’t find any advice to this on the web so I ask you for help.

    # May 16, 2013 at 9:27 am

    Select Parent and Child both categories while adding a new post. This will strip child category in permalink.

    # January 22, 2014 at 6:01 am

    For** subcategory will NOT appear in the permalink** — two ways

    Plugin
    for getting rid of nested subcategory i think you have to install plugin which can easily make you change url of page, post etc. This one came up first on Google: http://wordpress.org/plugins/custom-permalinks/

    .htacess
    You can rewrite you .htaccess if you are familiar with this.
    Add the below line and try it:
    RewriteRule ^category/(.+)$ http://www.site.com/$1 [R=301,L]

    # January 22, 2014 at 6:05 am

    For** subcategory will NOT appear in the permalink** — two ways

    Plugin
    for getting rid of nested subcategory i think you have to install plugin which can easily make you change url of page, post etc. This one came up first on Google: http://wordpress.org/plugins/custom-permalinks/

    .htacess
    You can rewrite you .htaccess if you are familiar with this.
    Add the below line and try it:
    RewriteRule ^category/(.+)$ http://www.site.com/$1 [R=301,L]

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".