I have not find any attempt to start yet, so the question is - is it possible to add at path behind the output of a custom post type?

This means: I have a custom post type "movies" and fill it with several categories and other attributes/ratings/whatever.

Their Path will be: www.test.com/movies/themovie1, .../themovie2, ... and so on

What I need to add is an automatically generated page that takes input from both movies and will generate behind EACH movie, just as it was a child element of "movies" in the hierarchie:


and even "better": www.test.com/movies/themovie1/vs/themovie2 and vice versa: www.test.com/movies/themovie2/vs/themovie1

Those have to be created automatically - I plan to create JSON files as a source for them as all the possible combinations being written into the database via insert_post would kill the database with millions of pages - I already know the architecture I need, issue is: can I create a single-movies.php that creates those sub-folders? (Possible idea: using a GET Query and have it transformed instead of ?vs=xyz?)

New contributor
DanWP is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Does this answer your question? Posts URL structure like site.com/category/the-post-title – BenB Mar 26 at 1:05
  • Thanks, but categories are unfortunately not what I am looking for. I want to have a single-post-type.php that has a variation of itself in a directory (this is why I was asking if it is possible to transform the GET_ Variants of such a file to a /get/variation1, /get/variation2 - maybe this is rather a generic PHP question if there is no solution using the WordPress Permalinks / .htaccess modification available? – DanWP Mar 27 at 16:20

Your Answer

DanWP is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.