How to make text show up – new page template

I created a Page Template following these instructions: http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

When I create some text in a test page and apply the template I created using the instructions at that link, the text I create doesn’t show up when I go ‘view page’.

Read More

What code do I need to add to the template so that text shows up?

Related posts

Leave a Reply

1 comment

  1. Your template must have the the_content() function called within the WordPress loop to show up the text you’ve entered while creating new post.

    You might have missed the the_content() function in your custom template, that function retrieves and show the content of your page.

    Here is sample usage

    <?php get_header(); ?>
        <div>
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                <?php the_title(); ?>
                <?php the_content(); /*This code prints the content*/ ?> 
            <?php endwhile; endif; ?>
        </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>