Latest News
- Version 1.1.1 released14.01.10
- Version 1.1.0 released07.01.10
- Version 1.0.1 released07.01.10
- Version 1.0.0 released04.01.10
Change your WP theme for one or more posts or pages
How to install the ThemePerPost plugin
You install this plugin in the same way as you do almost every other WP plugin:
- Download it from here and unzip it.
- Upload the themeperpost.php file to your Wordpress plugins directory. If you want to keep things tidy you can upload the themeperpost directory instead, but it's not necessary.
- Activate the plugin from the WP admin panel.
How to use the ThemePerPost plugin
To use this plugin you need to do two things:
- Upload a new theme to use.
- Tell WP which posts or pages are to be shown with the new theme.
Uploading a new theme
This plugin uses standard WP themes. All you need to do is upload a new theme to your WP themes directory and take a note of the directory name that you just uploaded.
Telling WP to use it
When you write a post or page you simply need to add a Custom Field to it to get this plugin to switch theme. The custom field name is themeperpost and the value must be the theme directory name you want to use. For example, the image below shows a custom field called themeperpost being added for a theme called carpet.
Changelog
14/01/10 --- Version 1.1.1
Updated so that get_template_directory_uri() and get_template_directory() calls use the right theme dir.
07/01/10 --- Version 1.1.0
Corrected for use with existing themes. Added themeperpost_get_header(), themeperpost_get_sidebar() and themeperpost_get_footer() to be used in place of get_header(), get_sidebar() and get_footer() in theme files.
07/01/10 --- Version 1.0.1
Change so that calls to bloginfo('template_url') now work.
04/01/10 --- Version 1.0.0
First public release.
Creating a theme
Using an existing theme
ThemePerPost works with any WP theme so you can install any new theme as you normally would and style individual pages and posts to use is by adding a Custom Field (see How To Use it).
If the theme you upload uses seperate header, sidebar or footer files - and most of them do - you will need to make a few small changes to your theme. If you are displaying a post then make the following changes to single.php, if you are displaying a page then make following changes to page.php:
- Replace call to get_header() with a call to themeperpost_get_header()
- Replace call to get_sidebar() with a call to themeperpost_get_sidebar()
- Replace call to get_footer() with a call to themeperpost_get_footer()
You can find out more about using Wordpress themes here.
Rolling your own
By default, Wordpress expects a Page to be displayed by a file called page.php and a Post to be displayed using single.php.
You can create simple themes for your pages/posts by creating a directory with only page.php or single.php in it. Here's an example of a simple theme for a post.
