Page Template to give a variation in Wordpress Theme

Below is a brief Article of Page Template to give a variation in Wordpress Theme.

Variation wordpress page template is important thing we should do if we want different theme in a single wordpress site. This manner also important for reducing the needed of size by different wordpress theme (Usually we need 2 wordpress site if we want two different theme).

This only can be done in downloadable wordpress (not in wordpress.com), because we need to add few extra file that can be a page template of Wordpress Theme.

see the file structure below (usually in wordpress theme directory)

page.php
--> load header.php
load #header {in style.css file}
--> load sidebar.php
--> load footer.php

page1.php
--> load header1.php
load #header1 {in style.css file}
--> load sidebar1.php
--> load footer1.php
page2.php
--> load header2.php
load #header2 {in style.css file}
--> load sidebar2.php
--> load footer2.php

all the thing we should do are
1. create page1.php and page2.php and more page template that we need.
2. create definition that usually same as #header in style.css but load a different header image. example #header1

this definition load another header image, so the appearance will be different from default appearance.

3. Use this syntax usually before <?php get_header(); ?>

<?php
/*
Template Name: Archives
*/
?>

4. Choose a page template in creating new page. See The Example below..


Figure 1. Choose a Default Page template
Figure 1. Choose a Custom Page template.

5. The Result


Figure 3. Appearance with default Page Template

Figure 4. Appearance with Custom Page Template.

That's all, now you can have a variation appearance in one wordpress site. We can make many kind of page template, that can produce variation of appearance in our site.

Komentar FB


Probably Related Article



4 comments:

danang said...
July 24, 2009 at 8:35 PM

nice tips bro,.. great

Picas said...
August 20, 2009 at 9:27 PM

trims danang..

kyknya sulit dimengerti deh setelah saya baca2 ulang..hehehe

Jake said...
September 15, 2010 at 5:04 AM

Good tutorial mate, nice sharing. I've got few projects with Wordpress, and the CMS is becoming one of my favorite. It is very stable, many plugins and very SE friendly.

Cleveland Web Design said...
January 6, 2011 at 3:26 PM

Thanks. Probably one of the most straightforward tuts I've found on creating a page template in WP.

Related Posts by Categories



Widget by