Skip Navigation

[Resolved] CPT Permalink Format

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

This topic contains 3 replies, has 2 voices.

Last updated by Jamal 3 years, 4 months ago.

Assisted by: Jamal.

Author
Posts
#2110785

Currently my WordPress permalink structure like this

hidden link{post-slug}-{post_id}

but my CPT permalink shows like this

hidden link{cpt-slug}/{post-slug}

is it possible to change CPT permalink as showed below

hidden link{post-slug}-{post_id}

I dont want to show my CPT Slug in my URL, is there any way to workaround ?

#2110941

Hello and thank you for contacting Toolset support.

WordPress custom post types have the following permalink structure hidden link{cpt-slug}/{post-slug}

The only customization possible, out of the box, is changing the cpt-slug by something else. You can do it in the rewrite option in the custom post definition, check this screenshot hidden link

Apart from that, it is not something possible with Toolset. It will require custom code for custom rewrite rules. Read more about it here:
- https://developer.wordpress.org/apis/handbook/rewrite/
- https://developer.wordpress.org/reference/functions/add_rewrite_rule/
- hidden link

Please note that such custom code is out of the scope of Toolset support.

#2113185

through rewrite option can I omit cpt-slug ?

as if I want like this

hidden link{post-slug}

#2113225

Well, with rewrite rules custom code, you can theoretically do whatever you want. However, that's not within the Toolset support. We will not provide any examples or solutions about it. You may want to check online support communities, such as StackExchange or StackOverflow. Or you may want to hire a developer to do it for you. Below the list of our certified developers https://toolset.com/contractors/

This is the WordPress StackExchange community: https://wordpress.stackexchange.com/