I created two CPT's:
- Servicios (Services) hidden link
- Locaciones (Locations) hidden link
And a many to many relationship: Servicios-Locaciones (Services-Locations) with ¨Intermediary Post Type visible in WordPress admin menu¨ option active. Because this is the most important content I will want to posisionate.
The problem is that the title and the slug for this intermediary post is not friendly. I get a post with the relationship name and the ID's of parents posts:
Title: "Servicios Locaciones: 10 – 11" -
URL: hidden link
But I'm specting something like:
Title: "Albañiles en Barcelona"
URL: hidden link
But created by default and not having to do it manually as the content will be massive.
1) Is it a way of setting this somewhere?
2) Is there another way of getting a URL structure like the example website with Toolset?
Note: The listing items at ¨Servicios¨, that would be the "Services providers", is a content that comes from an external DB. So that's why I didn't not create a CPT for that. (Just to clarify my whole idea.)
For example, suppose the relationship slug is 'book-post'. The code to update the post title and slug would for this relationship's intermediary post would look like this:
I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors: https://toolset.com/contractors/