Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLili Köves
3,471 PointsWordPress child theme page.php changes (commenting out comments_temp)does not show any effect. Could you help me please?
Following the instructions I commented out comments_template() in the page.php copied to my child theme. As I am using a different theme the code looks a bit different, there is slightly more, but I commented all out that seemed related to comments. Why does it still not change?
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
//if ( comments_open() || get_comments_number() ) :
//comments_template();
//endif;
?>//
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
1 Answer
Mark Truitt
17,230 PointsHi Lili,
Are you working locally or on a server? If locally, did you make sure you were using the child theme and that the page you were using had the template set correct. If on a server, all of the above and did you push the updated file to the server?
Lili Köves
3,471 PointsLili Köves
3,471 PointsI realized the problem, I was checking the changes on the wrong page, that was not affected.