Custom Post Template Plugin

Really Big Picture of a Copper Leafed Tree

Really Big Picture of a Copper Leafed Tree

I installed and tried a couple different custom post template plugins.   This one actually works quite well.   I don’t know if it is the name Custom Post Template that does it or not.   I do know that since WP 2.8 there are quite a few plugins that have stopped function.   Some that still do function have “issues”.

This one, while not stated as 2.8 ready, appears to be functioning quite nicely.

Custom Page Templates

Custom page templates are handled by the native code inside WordPress.   It is easy to create a page template and call it when you want it.   They are found with a little header code as I mentioned in the previous post.   But Post Templates are not a part of WP as of 2.8, maybe we will see this in 2.9, but I wouldn’t hold my breath.   Why?   Because you still have to know how to create the template, not just call it.

And each template page or post has to be tailored for your theme.   There is no generic templates you can just “Plug in” and they work.

Custom Post Templates

As theme structures and designs get more complicated it gets more difficult to come up with a post or page template.   Especially when the theme author get’s “fancy” with their code and goes outside of WP conventions to add some special functionality.   Of course that often limits what plugins code changes can be made to a theme.

There are reasons you might want to use a post instead of a page for a custom template.   Ex.   you want this content indexed under a category and not as a page.   You have content pertinent to the post that needs a special layout.   You could for example make a post template that displays a different sidebar layout or width for certain posts or category of posts.   If you are going to put large images or galleries in certain posts you might want a special width for those posts.   There are lots of reasons you might want to have a couple of post templates for your blog.

I didn’t really have any reason to make this full width other than to show you how this works.   So I thought I would display a larger than usual image at the top of the post.   One that fills a browser window for sure.

As with the page template you will need to add some CSS to your style.css file to accommodate your changes to width etc.   But if you are comfortable creating a post or page template you are probably comfortable adding some CSS.   And for what to add I will once again mention how invaluable firebug is to this process.

Well, it turned out the really big image wasn’t such a good idea, while it looked fantastic on the post page it rather badly broke the home page. So I reduced the Really big image to just a big image, but you get the idea of a full width post template. Content (words) and small images flow between home page and post page. but not giant over-sized images. Poor choice on my part.

Happy coding.