>
Download This Plugin | |
Download Elegant Themes | |
Name | Custom Post Type Template Redirect |
Version | 1.0 |
Author | Hotchkiss Consulting |
Rating | 0 |
Last updated | 2010-08-11 02:34:00 |
Downloads |
2224
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Custom Post Type Template Redirect plugin added 2 bytes of resources to the Home page and 0 bytes of resources to the sample Post page.
Custom Post Type Template Redirect plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Custom Post Type Template Redirect plugin ads no tables to your Wordpress blog database.One of the shortcomings of Custom Post Types in WordPress is that there's no way to easily set a different custom template from the standard single.php. If it's a custom post type, it's got custom information, and I want to put it in a custom template!
So I threw together a plugin to handle this. With this plugin installed and activated, it checks your template directory for posttype.php then t_posttype.php. If neither exists, then the standard WP template rules take effect.
For example, if your custom post type is 'books', it's going to check your template directory for 'books.php'. If it finds it, it will use that as the template for your 'books' posts. If not, it will check for 't_books.php', and use that as the template for your 'books' posts. If it finds neither, the standard WP logic kicks into place, looking to see if you've defined a template for the post, and, if not, using single.php.