Skip Navigation

[Resolved] CTP custom permalink

This support ticket is created 4 years, 8 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 4 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#1569561

Hi,

My permalink structure is /%category%/%postname%/

I have 2 categories:

hotel
restaurant

If I create a WP post, and assign to both categories, it can be opened using any of these 2 urls:

hidden link
hidden link

I have created a new CTP "location" which can use also the standard WP categories.
If I create a new location, also assigned to both categories, I also expect to be able to use:

hidden link
hidden link

Sadly, it doesn't work, and I don't know what I am doing wrong.

Any help is appreciated.

Thanks

#1569685

Hello and thank you for contacting the Toolset support.

With Custom Post Types this is not possible by default. Custom Post Types do not allow placeholders (%category%) which are necessary to create dynamic URLs. In the native Posts type, you can use things like %%category%% to create your Permalink. With Custom Post Types that is not possible, due to WordPress restrictions.

I still think that this could be possible by custom code, which is outside of the scope of this support forum.
For references here are some pages that may help:
- https://stackoverflow.com/questions/16664579/url-rewriting-via-wordpress-rewrite-or-htaccess
- hongkiat.com/blog/wordpress-url-rewrite/
- https://toolset.com/forums/topic/hierarchical-child-post-type-url/
- https://toolset.com/forums/topic/custom-taxonomies-not-showing-on-permalink/#post-16949
- https://toolset.com/forums/topic/adding-custom-taxonomy-to-url-and-permalink-not-working/