Tag Archive: templates

Custom Templates for Custom Post Types in WordPress

Building on my previous post about creating archive pages for custom post types, there’s another piece to add to the puzzle.

You archives pages will use the default index.php template. If you want to use a different template, you’ll need to hook into the template_redirect action to specify your template file. I like to use a file name like type-MY_POST_TYPE.php (although that’s easily changed), using the function below.
Continue reading