• Hi,
    I am developing a personal website using wordpress. Since there won’t be any posts I haven’t added any posts code. My pages with content are setup. However, when I click on the page I don’t see any content.

    What is the code to display page content? Is it the_content?

    I am not a coder, but understand the basic terminology so will need some hand holding to walk through.

    Thanks,
    Dharmesh

Viewing 2 replies - 1 through 2 (of 2 total)
  • ‘the_content()’ is the right function:

    look at a ‘typical’ page.php template (to show the pages); for instance in Twenty Eleven (slightly more complicated as page.php calls content-page.php to show the page title and content):

    the core of it is:

    <div class="entry-content">
    		<?php the_content(); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    	</div><!-- .entry-content -->

    http://codex.wordpress.org/Function_Reference/the_content
    http://codex.wordpress.org/Function_Reference/wp_link_pages

    Thread Starter priince

    (@priince)

    Great. I just need to figure out how to use it. In my search I found that content for pages and posts is saved the same way unlike pages as files. However, this is my first wordpress theme from scratch so am not sure how to make things work.

    Thanks a bunch.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to show page content?’ is closed to new replies.