Support » Theme: Twenty Twelve » Fix Page Content

  • Resolved cromermusic

    (@cromermusic)


    I’m using a child theme for twenty twelve. I have made some modifications in the content.php file and unfortunately the page.php file uses content.php so all of my Custom Fields for Posts now appears on Pages too. How do I get Page.php to only display Page Content?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Got to have something to do with this in the Page.php file:

    <?php if ( have_posts() ) : ?>
    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( 'content', get_post_format() ); ?>
    <?php endwhile; ?>

    I fixed it by copying the file content-page.php to my child theme and changing this:
    <?php get_template_part( 'content', get_post_format() ); ?>
    to this:
    <?php get_template_part( 'content-page', get_post_format() ); ?>
    in the page.php file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fix Page Content’ is closed to new replies.