[wp-testers] Slightly off topic

Nathan Rice ncrice at gmail.com
Fri Feb 6 22:08:41 GMT 2009


No problem!
Paul (and all),
I actually decided to just throw this out there for everyone on the list to
try out.  If you find this kind of functionality useful, please test this
plugin for me and let me know if you see any bugs.  Also, any feature
requests you would like to see would be greatly appreciated.

DOWNLOAD: http://www.nathanrice.net/download/post_templates.zip

OK, on to the plugin description.  Essentially, it gives theme authors the
ability to design and develop "Post Templates", in nearly the EXACT same way
Page Templates are created.

Upload and activate the plugin.  Then, in your currently active theme,
duplicate the single.php file and name it anything you would like to name
it.  Move the code around, and play with options.  Move the sidebar.  Change
div structure.  Remove the comments template call.  Do whatever you want!
Just be sure to include this snippet of code at the TOP of your file:

<?php
/*
Single Post Template: {Template Name}
Description: This is the description of the Post Template
*/
?>

(the description isn't necessary, but it's helpful to users.  Be sure to use
"Single Post Template" ... not "Template Name")

The plugin takes care of the rest.  It scans your template files, and finds
the Post Templates you created.  It then presents you with a dropdown list
in the single post edit screen.  Choose the template you want to use, save
(or publish) the post, and that is the template that post will use (exactly
like Page Templates).

I've tested it in WordPress 2.5-2.7 (not 2.3 compatible). It's an extremely
lightweight plugin too.  Less than 100 lines of code, and 5k file size.

I made this plugin with theme authors in mind.  You can either suggest that
your users install the plugin, or you can include it in your theme and call
it from your functions.php file like this:

include(TEMPLATEPATH . "/post_templates.php");

Please send your feedback if you get a chance.  It's not a huge step up in
functionality, but I think users would definitely appreciate the flexibility
it gives them (and you).

This plugin will be released under GPL and managed on
wordpress.org/extend/plugins so users can get updates, once the theme has
been thoroughly tested.

Thanks!
Nathan Rice


On Fri, Feb 6, 2009 at 3:52 PM, Paul Robinson <pablorobinson at gmail.com>wrote:

> Ok. Thanks Nathan :)
>
> Also thanks to Debra for your suggestion. I'll check flutter out too, it's
> an extremely complex but interesting plugin. :)
>
> Paul.
>
> 2009/2/6 Nathan Rice <ncrice at gmail.com>
>
> > Paul,
> > I'm sending you my plugin.  I just wrote it 10 days ago.  I'd love for
> you
> > to test it for me.
> >
> > Nathan
> >
> > My Website
> > http://www.nathanrice.net/
> >
> > My Twitter
> > http://twitter.com/nathanrice
> >
> >
> > On Fri, Feb 6, 2009 at 3:32 PM, Paul Robinson <pablorobinson at gmail.com
> > >wrote:
> >
> > > I have searched around and found nothing... I was wondering if anyone
> on
> > > the
> > > list has ever heard of a plugin for post templates, like the page
> > templates
> > > but for posts instead?
> > >
> > > It's something I'm sure someone has asked before but I can't seem to
> find
> > > any mention of it. :(
> > >
> > > Paul.
> > > _______________________________________________
> > > wp-testers mailing list
> > > wp-testers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-testers
> > >
> > _______________________________________________
> > wp-testers mailing list
> > wp-testers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-testers
> >
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list