Passer la navigation

[Résolu] URL's for Intermediary relationship

This support ticket is created Il y a 1 year, 11 months. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Minesh Il y a 1 year, 11 months.

Assisté par: Minesh.

Auteur
Publications
#2702761

Tell us what you are trying to do?

I would like to have 2 URL's for each side of an Intermediary relationship and customise them accordingly.

I have 2 CPT's (Product & Job Roles) that have a many-to-many Intermediary Relationship (Product x Job Role).

Instead of (or as well as) the URL:

/product-job-role/products-job-roles-3015-3095/

I would also like both:

/product/job-role/products-job-roles-3015-3095
(this would be customised to show Job Role info within a Product)

and

/job-role/product/products-job-roles-3015-3095
(this would be customised to show Product info within a Job Role)

Essentially I want to generate 2 URL's for both sides of the relationship and customise them accordingly (and ideally name the URL's):

/product/job-role/job-role-name
/job-role/product/product-name

Thanks for any help

#2702790

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I'm afraid that there is no such feature available to customize the permalinks for the intermediary post type.

Custom rewrite rules are tricky to implement, even for advanced developers, and tend to require frequent modification with changes over the time if any.

Any customizations with URL using such custom placeholder, you need to add rewrite rules and that needs custom programming. Following are a few links, which may help you achieve this, please have a look:

Plugin: https://wordpress.org/plugins/rewrite/
WP Plugins Repository Search: https://wordpress.org/plugins/search.php?q=url+rewrite

Few Articles that may help you:
- lien caché
- lien caché
- http://code.tutsplus.com/articles/using-wordpress-for-web-application-development-available-features-part-6-url-rewriting-or-routes--wp-34326
- lien caché

For any of your custom URL rewrite requirement, I would suggest contacting our certified partners.
=> https://toolset.com/consultant/