Skip Navigation

[Resolved] Customising permalink for custom post types

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

Our next available supporter will start replying to tickets in about 1.72 hours from now. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Shane 4 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1766287

Tell us what you are trying to do?
we are busy developing a website with a very heavy SEO focus. We have 3 core post types: Service, Industry & Location, and various relationships between these. I am trying to optimise the slug / permalinks for some of these post types, to get maximum SEO benefit. I don't even know if it is possible, but i do know that on another website we are customising the slug using information from the post. for instance, I would like the location (parent of a relationship) to be included in the slug for a child of the relationship
Is there any documentation that you are following?
Not really. Is there any?
Is there a similar example that we can see?
hidden link This site effectively delivers much of what we are looking to do, but ours is a little more sophisticated. We have the same location hierarchy, but then a separate Location service post type that is linked to the location and service, so starting at the location, we can compile a page that shows all the services for that location, but we can also start at the service and show all the locations where this service is available.... and obviously the SEO benefits that will allow us to re-use excerpts from the linking post types in a multitude of situations
The only way I can see achieving the same URL structure, would be to have everything as the same post type in the same hierarchy.
My original vision was to establish the proper information architecture, that can be navigated from different directions, without the constraints of hierarchies

What is the link to your site?
hidden link has the (WIP) menu to the site (you will see an SSL warning, but you can safely ignore this)

https://toolset.com/forums/topic/using-relationship-data-in-the-slug-of-the-custom-post-type/ this post seems to be looking at something similar, unless I'm mistaken.
I'm not really familiar with PHP (which is why I'm using toolset), so will need a bit of help to come up with the right code

#1766527

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johanna,

Thank you for getting in touch.

Actually adding the Post Relationship information to the slug would have to be done by custom coding. This is not something that can be achieved out of the box.

Unfortunately due to the level of custom code required it would be out of our support scope to assist with this. As such I would recommend contacting one of the registered contractors from our site to help with customizing this for you.
https://toolset.com/contractors/

Thanks,
Shane

#1766529

Dear Shane, as per the post that I referenced in my original post, it seems like some of your colleagues are a bit more open to assisting users on the matter. Maybe pass it over to them?

#1766551

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Johanna,

Currently i'm the only one available in the timezone today, however what you can do is to close this one and create a new ticket with the same query, so on Monday another colleague can assist with this.

Let me know if this is ok for you.

Thanks,
Shane