How to add content to a custom page?
-
So I took the task on of creating a new custom page for my theme. It was surprisingly easy. I created a blank notepad doc and called it test.php. Then, I uploaded it to my theme’s pages directory. I go to the theme editor, open it up and add the following:
<?php /* Template Name: Business */ ?>
Sure enough.. when I go to create a ‘New Page’, it’s now under the ‘Page Template’ dropdown. So.. now I go to the Theme editor, add the header:
<?php get_header(); ?>
Voila.. there it is. I add only 1 sidebar (instead of the 3 that every other page has):
<?php include(TEMPLATEPATH."/sidebar_left.php");?>
and then…. I add the footer:
<?php get_footer(); ?>
All done! Looks great!
Now.. I need one last piece. What do I add to this code to make it see the new content I’m adding in the Visual Editor for the page?
Thanks!
- The topic ‘How to add content to a custom page?’ is closed to new replies.