How can I show custom post type through two URLs
-
Can anyone help me out with the following problem I’m having with a portfolio site I’m developing to display projects by either client or medium.
I have a registered custom post type “projects” and the two taxonomies, “clients” and “mediums“
The site has already been designed (by someone else) and requires two different paths to view the projects by either client or medium. This state has to be reflected in both the main navigation state and the page navigation (previous and next links).
Currently, I’ve managed to get this to work for the following paths:
**/clients**
**/mediums**
and
**/clients/clientA**
**/mediums/mediumB**
With each showing the filtered collection of custom posts and attaching classes correctly to the navigation so that the path or state is consistent with the URL.
However, the permalink for the single post is currently set to the default for the custom post type of **/projects/projectX** which means that I have no way to determine within the single-projects.php the navigation state or previous/next links.
——
How can I have both of these URLs show the same page and have have navigational elements on the page reflect the two different URLs?**/clients/clientA/projectX**
**/mediums/mediumB/projectX**
I’ve been going around in circles trying many different methods for a few days, so would really appreciate any help.
Thanks in advance.
- The topic ‘How can I show custom post type through two URLs’ is closed to new replies.