By using a plugin called “Custom Content Type Manager”, I have implemented in my blog a simple Custom Post Type called “game review” which is simple a post, plus some extra fields which represents the rating of the game for graphics, sound, etc…
However, I could not find a plugin which helps in rendering/displaying this custom type. I understand, that I can create a page called single-game-review.php
and this will be used to render it, but I found this not very convenient. The problem is that whenever I change theme, I have to recreate the file. Also the logic of the theme is duplicated in the new file.
An idea would be to redefine the function the_content()
so that when it’s used on “game review” post, the output is actually the content of the post itself plus the extra fields rendered for example as unordered lists. In this way I can change these without breaking the rendering of the custom post type.
There are plugins which can do that? Or I have to do it by hand in a completely unsupported way that breaks ad the first update?
+1 to putting your post types in a dedicated plugin
What you’ll want is to do something like what BBPress and Buddypress are doing.
In BBPress, default templates are provided. If the theme provides none, the defaults are used. All the themer has to do is add
Yes, anything a user would expect to keep after changing themes belongs in a plugin. This includes custom post types, taxonomies, metaboxes, and shortcodes.
Very useful info at:
and