custom post types/templates
-
Assume that you have a movies.php custom page template ( which has room/zones for a nice movie post layout incorporating custom taxonomies such as genre,director,actor etc)….
How do you establish a default association in between “movies.php template” and the custom post type called “movies” so that WordPress could automatically defaults to movies.php template whenever it detects a movies post type is aout to be served..
Why do i want that? I think it does not make much sense to select a corresponding page template from the dropdown every single time you want to add a new movie post. If you are going to post 100 movies, chances are you will set the template to movies.php 100 times.
This kind of functionality exists, when you create a regular page.. wp automatically serves it with the page.php, without us associating the post with the page.php,.. it’s given… right? so why not do the same automatically when creating a new post ( of custom post type X for example) with a template file exactly named as x.php?
- The topic ‘custom post types/templates’ is closed to new replies.