• Hi, I’d appreciate some help with the following matter:

    I have a website with thousands of articles, categories and subcategories. I’m currently using the following parameters for my permalinks: /%category%/%postname% and this way’s pretty cool but given the fact that I have subcategories some articles end up with url-s such as:

    http://mywebsite/car-types/luxury-cars/ariticle_name

    Is there a way to bypass the category IF subcategory exists while generating the permalinks? I know there is, it’s a simple if condition that tests subcategory for boolean 1 value but my current programming knowledge don’t allow me to find the answer alone.

    I want to apply this condition only for posts that are posted in subcategories. For example, I will still have urls such as:

    mywebsite/news/my_new_article but if the particular article is posted in a subcategory, only the subcategory will be displayed after root.

    Thank you for your time!

  • The topic ‘Cleaning the permalinks’ is closed to new replies.