• I’m stuck — working on a child theme for Twenty Eleven.
    Basically I want to remove the “posted by” from all posts.
    I see that it comes from the function “twentyeleven_posted_on()”, but can’t seem to figure out how to remove just the author part, without breaking everything.

    So — is there a way to Null the whole function completely?

    thank you for your time,

    john-

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you want to remove the author information from single posts you will need to have a copy of content-single.php in your child theme. The line you are looking for starts with $tag_list = get_the_tag_list(....... You will see an if/elseif block with the variable $utility_text.

    This is where you need to remove the author information.

    if ( '' != $tag_list ) {
    	$utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
    } elseif ( '' != $categories_list ) {
    	$utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
    } else {
    	$utility_text = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
    }

    You can replace the if/elseif with the above code. This removes any mention of an author.

    Thread Starter jomonto

    (@jomonto)

    NateJacobs-

    Thank you for the response. I added the file to my child theme, made the edit that you suggested, but unfortunately it’s still there.

    With only ONE post — you get just the date of the post (no author).
    Add a second post, and then it adds the “posted by”.

    I’ll keep looking and hacking, see if i can find where this is coming from.

    Thanks for your time,

    john-

    Thread Starter jomonto

    (@jomonto)

    For now —

    Added this to my child / style.css

    .entry-meta {
    display: none;
    }

    And now no more author… and date too – but ok for now.

    thanks-

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Removing a function’ is closed to new replies.