Skip Navigation

[Resolved] Custom URL structure as in posttype/posttype/postslug

This thread is resolved. Here is a description of the problem and solution.

Problem:
Can I create a URL like the below, using 2 Post types?

 
site.com/posttype/posttype/postslug

Solution:
No, it's not possible.

https://toolset.com/forums/topic/how-to-achieve-this/#post-453939

This support ticket is created 7 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by hossamH-2 7 years, 5 months ago.

Assisted by: Beda.

Author
Posts
#453886

I am trying to have custom post type 'country' and custom post type 'city' in a way so when I visit site.com/france/paris I should see a snipped about 'france' and 'paris' from their posts. To my understanding I can achieve this with this product and I even can make use of the almighty Visual Composer to design the landing pages nicely from the post fields and contents.

I am not sure though about the permalink and can't see in my mind how it should work.

Is this even achievable? If yes, how?

Thanks in advance!

#453939

No, this is not possible, because Post Types are not nestable as you suggest in the above URL Structure.

You can do that in Taxonomies, means France would be the Taxonomy and City the Term (Paris)

I rather suggest to create a parent/Child relationship with Toolset Types where you can create a parent post (France) and then assign several Child posts (Cities) to it.

But the URL will still be by WordPress standards, means, you will see /france.
And then you can list with a view all related Child Posts (Cities) on that Post.

DOC:
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
https://toolset.com/documentation/user-guides/displaying-related-child-posts/

#454031

Thanks for your couple of resources; I believe this is what I needed as a guidance.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.