I'm creating a WordPress site that has 3 custom post types registered:
All of these post types are inter-connected and share a relationship using custom fields. For example, the
chapter has a custom field that stores the
course post object in which it belongs to. Same goes for the
lesson and the
chapter it belongs to.
My permalink settings are using the:
%category%/%postname%/ structure, in which display the post's URL like so:
What i'm trying to accomplish is to create a custom permalink structure that shows the relationship between these 3 post types in the URL. Example below:
When user is on course:
When user is on a chapter:
When a user is on a lesson:
Any help on this would be greatly appreciated.