Support » Fixing WordPress » Page content not showing, looking for proper code

  • I’ve created a WordPress theme by pulling apart a finished HTML theme. This WordPress site will be used for CMS only with no posts, comments, etc. The frontend actually will not use any real blog features for the time being. I was able to set this all up using the site with no problems. I was able to get posts and comments to appear and then later disabled them. But I can’t get the page content to appear.

    It is a real simple site with just a header, sidebar, index(content), and footer. The sidebar will have five links in it. I’ve created pages for these links, inserted the code to call for pages, sorted them properly, etc. But when I click on a link the content area is blank. Header, sidebar, and footer remain, but the code for the content area clearly doesn’t call on the page properly.

    I copied over code from other basic themes thinking that would work, it did not. So I am definitely not understanding something.

    What code do you think I am missing? Missing from page.php and maybe index.php? I just need code to display page content. There will not be any posts, comments, etc., within this page content.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Please include a link to your site and also add your modified files using pasetbin and link us to those also. Without this, little help can be given.

    Were you manually adding the content from these pages to the page.php files or where you just using the the_content(); feature and then entering the content through WordPress?

    Trying to use the_content(); feature and entering the content through WordPress by creating pages. Code on the page.php (between my layout code):

    <?php the_post(); ?>
    				<?php get_template_part( 'content', 'page' ); ?>
    				<?php comments_template( '', true ); ?>

    Same code on index.php.

    I’ve tried a few others, but that is what is there now.

    Tried simply

    <?php the_content(); ?>

    as well.

    After you posted the_content reference I was able to search successfully for a solution. My ‘loop’ wasn’t setup properly. Now it is, not it works.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Page content not showing, looking for proper code’ is closed to new replies.