• santoshkp

    (@santoshkp)


    Hi,

    I have created a custom post corporates having industries as categories. My single page URL looks like follows:

    :site-url/industries/%industry-category%/single-post-slug

    Using this plugin I have made the name of the category dynamic. So instead of %industry-category% the category of the post gets printed.

    Now the problem is if a post does not contain any category(industry). The %industry-category% gets printed in the URL. Which looks really bad and also not good for my SEO.

    In this scenario, if a category is not available %industry-category% should not get printed.

    Thanks

  • The topic ‘Remove category slug if no category selected in custom post.’ is closed to new replies.