WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

In TwentyEleven the "posted on" text is well above the title. I want it to replace the "posted in category" text.

Is there a php file that populates the page where I can just edit where this stuff pops out? I checked my pages.php file but I couldn't seem to figure out what to change.

share|improve this question
up vote 1 down vote accepted

If you are using the twentyeleven theme which it looks like you are, there is a function called twentyeleven_posted_on(), on line 24 within your content.php file. If you want to move the posted on below then move this piece of code ->

<?php if ( 'post' == get_post_type() ) : ?>
        <div class="entry-meta">
            <?php twentyeleven_posted_on(); ?>
        </div><!-- .entry-meta -->
        <?php endif; ?>

Down to the footer section, look at line 55 or do a search on your IDE for "posted in". You'll see some code like the following ->

<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?>

Either comment out this code or remove it and replace it with the above code.

Just so you know, when you looked at your page.php file you will notice a function call to ->

<?php get_template_part( 'content', 'page' ); ?>

This is calling the content-page.php file. Even within this you won't find the changes you want to make because it appears your blog page is calling index.php. Within index.php this is calling the following ->

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

This will load the content.php file with your posted on and posted in code e.t.c.

Hope this helps

share|improve this answer
Thanks thirdOctet, that does help. I have one last question. I'm using a Child Theme for twentyeleven, is there any way to make these changes to the Child Theme only? – Luke Aug 5 '12 at 13:46
Hey Luke, is the child theme a separate directory with all the files such as content.php, content-single.php, functions.php e.t.c – thirdOctet Aug 5 '12 at 13:48
Yep, I think I got it though. I just copied content.php into my child theme folder. :) Previously it was very barebones. – Luke Aug 5 '12 at 13:54
no worries luke glad you got it fixed – thirdOctet Aug 5 '12 at 13:56
If you look, you'll noticed that the theme is handling everything properly now. Thanks so much for the help. :) – Luke Aug 5 '12 at 13:57

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.