WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to remove the 'Featured', 'Date' and 'Comments' from my Twenty Eleven child theme sticky post that I have on my landing page.

I am finding it hard to find any information that show what functions I will need to override and what files they reside in. Does anyone know what I need to override and help point me in the right direction.

I have amended the 'loop' in index.php adding which only shows the posts that are not sticky. I now need to remove the comments etc from sticky post, any idea as to what function(s) I will need to override? Thanks in advance

code for index.php

<?php if ( have_posts() ) : ?>
            <?php twentyeleven_content_nav( 'nav-above' ); ?>

            <?php /* Start the Loop */ ?>
            <?php while ( have_posts() ) : the_post(); ?>
                    <?php if( !is_sticky() || !is_home() ) :?>

                <?php get_template_part( 'content', get_post_format() ); ?>
                <?php endif;?>
            <?php endwhile; ?>

            <?php twentyeleven_content_nav( 'nav-below' ); ?>
share|improve this question

migrated from stackoverflow.com Dec 11 '12 at 16:32

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

<?php get_template_part( 'content', get_post_format() ); ?> is calling the content template, you'll need to edit that template view and remove the things you don't want. Or wrap them in if statements of some sort.

share|improve this answer
most likely, if its the featured content you want to edit. if its regular content, its probably content.php – Magicmarkker Dec 6 '12 at 19:46
Ahh I see do you think it will be a if(!is_sticky()) display as normal else {nothing for comments etc}, in content.php Thanks for your input Magimarkker am I on the right lines?? – Alan Dec 6 '12 at 19:50
Yep sounds about right to me! – Magicmarkker Dec 6 '12 at 19:50
Gonna giv it a go, – Alan Dec 6 '12 at 19:51
removed the line <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3> from content.php which has removed featured! great so far, thanks! – Alan Dec 6 '12 at 19:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.