I have created one custom post type lets say movie, now I have created 4 posts under movie type.
Slugs are movie/parasite/director
and movie/parasite/actor
.
Similarly movie/joker/director
and movie/joker/actor
. Now I want to load two types of template one for director and other for actor based on slug.
I'm using pod plugin for custom post type.
What I'm doing I have created one single php file name single-movie.php
file under theme folder. This single-movie.php
file template file is loading for all movie post type but I want to load different template based on movie post type slug. Any help appreciated.
register_post_type
parameters which you don't use because you use Pods. Pods help and other 3rd party plugin dev support is off topic here. The only generic solution that might work is to admit that you actually have 2 post types not 1 and split them rather than trying to bundle them into one, or to move toregister_post_type
and abandon pods