WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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'.

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

share|improve this question
Please add debug information to your question to make answers possible. – toscho Jul 29 '12 at 20:55
what is the exact code of your page template? – Michael Jul 29 '12 at 21:33
If you view source, can you see the text in the HTML? it may be a styling issue – 101phil Jul 29 '12 at 22:18
up vote 1 down vote accepted

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(); ?>
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <?php the_title(); ?>
            <?php the_content(); /*This code prints the content*/ ?> 
        <?php endwhile; endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.