Skip Navigation

[Closed] Remove slug from custom post type

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 5 replies, has 3 voices.

Last updated by Karin 9 years, 1 month ago.

Assisted by: Waqas.

Author
Posts
#287647

I am trying to: Remove slug from custom post type

I made a custom post type "Company" and want the URL structure te be like a normal page structure.

So not domain.com/company/state/city/compagne-1
But like this: domain.com/state/city/company-1

How can i remove the custom post type "company" slug from the permalink?

#287798

Please some help?

#287822

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

types-options-url-rewrite.png

Generally, you can alter the slug by using "Use a custom URL format" under "Rewrite" option, when editing your CPT (see attached).

Please let me know if I can help you with anything related.

#287832

Let me explain what i want.

Just like normal pages i want a page / sub page / sub sub page

Live example page format: hidden link

But with a custom post type you get example.com/post-type-name/nummer-1/nummer-2/

I don't want the /post-type-name/ in URL

So /state/city/ needs be something like /%postname%/ or ?!?

This plugin unfortunately doesn't work with Types: https://wordpress.org/support/view/plugin-reviews/remove-slug-from-custom-post-type otherwise it would have fixed my problem.

#288131

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Actually, this looks like a custom approach to handling URL (a.k.a. URL Rewriting). I will suggest to contact our Custom Coding Service (hidden link) for a customized solution on this.

Since 'Types' provides a limited solution to rewrite the base for your CPT, it may not cater the advanced requirements, without applying a custom solution.

#288168

What is the best way to handle the structure of the CPT. Now you have company. This company is located in a city and the city is in a state. If you want the permalinkstructure as mentioned above (/state/city/company) can you accomplisch this by a taxonomy.. so you make a taxonomy eg location. The state is the mother tax and the city the child.
Or do you have to make another CPT like location, which is the mother of the CPT company. And the state is a taxonomy or location. So you have a city.. with taxonomy State.. and this is the mother of a company.
If you work with one of this structures, can you build a permalink like state/city/company where in the parent relationsship with two CPT state is the taxonomy of city and company is a child of city.

Been all over the web looking for a solution for this

The topic ‘[Closed] Remove slug from custom post type’ is closed to new replies.