Make single post permalink only display first parent category in URL

Posted in: Newspaper
Post count: 11

Hi,

Is it possible to make a single post permalink only display the first parent category slug (and not child categories) before the post slug in the URL?

Thanks,
Yon

Post count: 23312

Hello Yon,

All the permalinks settings can be found here -> https://www.screencast.com/t/id1zUnyq in Theme panel.

Thanks.

Post count: 11

Hi Catalin,

Thanks for your reply. I am aware of the permalink settings. My question relates to the follow scenario:

In the permalink settings I have created a custom structure for posts:
Example: https://www.mydomain.com/%category%/%postname%

What this does on post URLs however is it appends all parent categories of the selected category for that post to the URL:
Example: Imagine I have a category hierarchy like this:

main-category
– sub-category
— sub-sub-category (this is the selected category for the post).

The URL would then result in:
https://www.mydomain.com/main-category/sub-category/sub-sub-category/post-title

This can cause URLs to get very long. Is it possible to make a single post URL only display the first parent category slug (and not child categories)?

Example: https://www.mydomain.com/main-category/post-title

Thanks,
Yon

Post count: 23312

Hi,

Unfortunately, the theme does not have any such a for this, sorry! If you want to change the permalink structure, you should edit the theme core files and if you are not aware of the steps which are needed to take in this case, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!

Thanks for the message!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.