Tuesday, 18 September 2012

How to create and custom page template in wordpress?

1). create a file : D:\xampp\htdocs\wp-register\wp-content\themes\twentyeleven\test.php

2). Paste the following code :
<?php
/*
Template Name: test
*/
get_header();
?>
<?php echo "test page is called";?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

3). Open wp-admin and create new page : view template on right side : select "test" option.
4). Done.

No comments:

Post a Comment