1 of 5

Permalink for CPT with taxonomy

What I need is more than a simple slug rewrite... hopefully someone can help me out here.

Say I have two Custom Post Types: - Science Question (default slug: science-question) - Math Question (default slug: math-question)

In the future there could be more, ex: - English Question (default slug: english-question)

Each CPT has a custom taxonomy with terms: "Task 1, Task 2, Task 3, and Task 4" (different CPT has different amount of Task#)

What I am hoping to accomplished is have URL structure as following:

For example, a "Science Question" post associated with the term Task 2:


A post in CPT "Math Question" associated with the term "Task 4": www.domain.com/math/question/4/%post-name%

Can anyone kindly give me a clue how can this be done?