• I have set up a 2010 child theme and I have some categories with posts. If I click on the category the category archives page appears. At the bottom is ‘Posted in category’ and then ‘Leave a comment’. I don’t want ‘Leave a comment’ to be there. I have disabled comments for each post in the category. How do I edit this page to delete ‘Leave a comment’?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Make a copy of loop.php from the original Twenty Ten theme to your child theme’s folder. Rename it loop-archive.php and edit the part near the bottom that looks like this:

    <div class="entry-utility">
    				<?php if ( count( get_the_category() ) ) : ?>
    					<span class="cat-links">
    						<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
    					</span>
    					<span class="meta-sep">|</span>
    				<?php endif; ?>
    				<?php
    					$tags_list = get_the_tag_list( '', ', ' );
    					if ( $tags_list ):
    				?>
    					<span class="tag-links">
    						<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    					</span>
    					<span class="meta-sep">|</span>
    				<?php endif; ?>
    				<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    				<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    			</div><!-- .entry-utility -->
    		</div><!-- #post-## -->
    
    		<?php comments_template( '', true ); ?>

    Take out the parts that you do not want.

    Thread Starter pgb

    (@pgb)

    Thanks very much, that’s great. I’m learning!

    Thread Starter pgb

    (@pgb)

    I’ve done as you suggested with the loop-archive.php but I’m not sure what to edit. I’ve changed the php comments_template to false and tried deleting it but still the Leave a comment appears. What exactly should I edit?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to edit category archives page in child thme of 2010’ is closed to new replies.