WordPress.org

Ready to get started?Download WordPress

Forums

Page content not showing, looking for proper code (7 posts)

  1. ciredrallop
    Member
    Posted 2 years ago #

    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 codex.wordpress.com 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.

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    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.

  3. alanchrishughes
    Member
    Posted 2 years ago #

    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?

  4. ciredrallop
    Member
    Posted 2 years ago #

    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 ); ?>
  5. ciredrallop
    Member
    Posted 2 years ago #

    Same code on index.php.

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

  6. ciredrallop
    Member
    Posted 2 years ago #

    Tried simply

    <?php the_content(); ?>

    as well.

  7. ciredrallop
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.