Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7010139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:57:10+00:00 2026-05-27T21:57:10+00:00

What kind of WordPress function do you use to show the page contents? I

  • 0

What kind of WordPress function do you use to show the page contents?

I used the_content to show the post contents, but what about the page contents? 

I have tried everything, but I haven’t found a function that displays the page contents of WordPress.

Also, I have created a basic page.php file, and in the file I have:

 <div id="pages">
    <li><?php wp_list_pages() ?></li>
 </div>

Now, why do my index.php have my list of pages even though I didn't use the inlcude  or require function? 

Keep in mind I created my own theme and site, and I’m trying to put it in WordPress for the first time.

Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:57:10+00:00Added an answer on May 27, 2026 at 9:57 pm

    The function wp_list_pages() lists all the pages. If you want to list all the recent posts you should use

    index.php

    <?php get_header(); ?>
    <?php while ( have_posts() ) : the_post(); ?>
        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
            <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
            <div class="entry-content">
                <?php the_content(); ?>
            </div>
        </div>
    <?php endwhile; // end of the loop. ?>
    <?php get_sidebar(); // If you have sidebar ?>
    <?php get_footer(); ?>
    

    page.php

    <?php get_header(); ?>
    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
            <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
            <div class="entry-content">
                <?php the_content(); ?>
            </div>
        </div>
    <?php endwhile; // end of the loop. ?>
    <?php get_sidebar(); // If you have sidebar ?>
    <?php get_footer(); ?>
    

    Make sure you check the default twentyeleven and twentyten themes to get idea of how to code WordPress Themes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Kind of like this question I have many text snippets that I use many,
be kind this is my first post. I have a Crop intent retuning and
I noticed that when I call the the_post() or the_content() function from my wordpress
Is it possible to add some kind of properties to a Wordpress page? In
I am kind of Wordpress noob, but trying to implement my HTML/CSS theme into
I'm doing a WordPress theme and I have Share your story page, where everybody
I have a very strange problem with wordpress. I have this kind of pages:
Kind of a follow up to a question from yesterday. I have a hash
quick question here. Is there any Wordpress 3.0 documentation available? Some kind of list
I recently began attempting to develop a simple Wordpress theme for myself, and have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.