One of the great many features in GD Custom Posts And Taxonomies Tools Pro plugin, is added templates for post types and archives. But, WordPress 3.1 added own post type archives and things changed, causing problems with the templates added by the plugin.

Plugin adds date year, month and day based templates for archives and adds ID based post templates, that, as far as I know will work fine. But, post types templates for archives are a bit of a problem.

For WP 3.0, plugins added type-{post-type}.php and type.php templates support for archives of custom post types posts. WP 3.1 added standard archive-{post-type}.php template and for various reasons, type templates stopped working. Plugin implements several functions and enhancements that don’t play well with WP 3.1 due to conflicted functionality, so last plugin version 2.6.2, added some warnings and more info on how to use the templates.

GD CPT Tools: Settings
GD CPT Tools: Settings

Many users of Pro version liked the idea of custom post types archives and used them with the plugin long before WP got them, and now is the problem compatibility of using both. So, on the plugin Settings panel you see options, and first two are now clearly marked as WP 3.0 options. So, if you use WP 3.1, disable these.

Third option from the top is to add type based templates to WP 3.1, but that is not working as you expect it now. On some installations is OK, but not on all. It all depends on the existing rewrite rules and on some installations is conflicted. I still have no idea why this happens, and I am trying to determine what is happening with WP template loader to cause problems.

Solution to problem is simple, and it involves renaming the existing template. So, if you have custom post type movie, and your existing template is type-movie.php, simply rename it to archive-movie.php. WP 3.1 will now load this template and everything will work, and all the code you already have will be used.

But, I will still try to determine why the loading of additional template for custom post types fails in WP 3.1, and you can expect solution in some of the following plugin versions.

No votes yet.
Please wait...

About the author

MillaN
MillaN
Dev4Press owner and lead developer

Programmer since the age of 12 and now WordPress developer with more than 8 years of WordPress experience, author of more than 100 plugins and more than 20 themes.