0

I want to create a custom post type relationships between two fields called 'Work' and 'Director' using Metabox. I have already created the CPTs.

This is an example of a permalink for 'Work' -> www.example.com/work/directors-cut-best-in-the-world/

This is an example of a permalink for 'Director' -> www.www.example.com/director/wes-pollitt/

What I want to achieve is where a director has one work in relation. So I want the permalink in this instance to change to www.example.com/director/wes-pollitt/directors-cut-best-in-the-world/ keeping the normal permalink for work as well.

Any ideas as to how I can achieve this.

1 Answer 1

0

Here, WordPress doesn't allow to run URL in two way.

e.g. (1) www.example.com/work/directors-cut-best-in-the-world/
     (2) www.example.com/director/wes-pollitt/directors-cut-best-in-the-world/ 

You should decide which URL do you want to run in browser. If you want to run single URL then check this : Add category base to url in custom post type/taxonomy

You can conditionally change permalink before load.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.