How to make a post accessible from multiple post type slugs?
I have two custom post types
- colors
- shapes
I have a post called red under the custom post type colors. The default URL for this post would be
example.com/colors/red
Now I want to make it accessible from the following URL as well
example.com/shapes/red
The closest I came with is to add a filter to change_404_template (as I receive a 404 for above url) and forcefully inject the single.php file with some hacky code.
Is there a way more standard method to do this ?
Topic rewrite-rules custom-post-types Wordpress
Category Web