Set permalink base for listing blog posts

Is it possible to have a custom permalink structure with the following conditions -

For blog posts: /blog/post-title/
For listings: /property-details/listing-title/

Here’s my current setup shown in the images -


Everything seems fine, except the single listing page also includes “/blog/”. The resulting URL becomes “/blog/property-details/listing-title/”

Am I missing a step, or are there additional settings I need to adjust?

Hi,

Please note that these are WP-level issues. Additional PHP snippets are required to customize this, please check this sample: wordpress - Custom permalink structure: /%custom-post-type%/%custom-taxonomy%/%post-name%/ - Stack Overflow.

​I hope this is helpful to you.

Hey Andrii

Thanks for the quick reply and the explanation :slight_smile:

I was wondering if I set the custom permalink structure as /%category%/%postname%/ will it add the category to the listing as well? I mean will it change from /property-details/listing-title/ to /%category%/property-details/listing-title/ ?

Hi,

Unfortunately, no, this will be applied to posts that are in the blog, in the custom post types slug the one that can be changed and the title will also be displayed.

Thanks for the explanation Andrii :slight_smile:

I’ve just updated the permalinks settings as follows:


Additionally, I’ve set a default category for my WordPress posts to “blog”. Now, all my posts automatically receive the “blog” category.

As a result, my URLs now appear like this:
For blog posts: example.com/blog/post-name/
For listings: example.com/property-details/listing-name/

This is exactly what I wanted to achieve in the first place. Is this the expected behavior, and is this approach correct? Or could it potentially harm my website or SEO?

Thank you :slight_smile:

1 Like

Hi,

No, everything should be fine with SEO. But please note that the category block is made as “decorative” for the purpose of permalinks, if this suits you, then there should be no other issues.

Great, thank you :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.