WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[resolved] On the blog homepage, how do I remove the AUTHOR from the H2 tags? (5 posts)

  1. ronpark
    Member
    Posted 1 year ago #

    Hello all,

    I have had a helluva time trying to find the H2 tag code that pulls up on the homepage of the site that I am optimizing.

    http://tinyurl.com/cynvmka

    I am guessing that the H2 code of the DATE + AUTHOR is hard-coded somewhere where I'm not looking.

    Would someone please lend a hand on where I can find the code that pulls up the H2 tag? I would like to keep the calendar date, only want to remove the author.

    Thank you for your help in advance.

    Ron

  2. ronpark
    Member
    Posted 1 year ago #

    Is the solution within the functions.php file?

    I was able to erase the Author from the homepage by erasing some lines, but it would be

    April 3, 2013 by

    I don't know where I have to go to delete that " by"

    Your help will mean a lot. Thank you.

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    The easiest way to do that is by hiding it using this CSS:

    .by-author {
       display: none;
    }

    I would not recommend modifying theme files in the default theme.

  4. ronpark
    Member
    Posted 1 year ago #

    Thank you so much. It worked perfectly!!!

  5. Avantart
    Member
    Posted 1 year ago #

    it is better not to use CSS to hide something ;=)

    the complete info is printed by
    <?php twentytwelve_entry_meta(); ?> in your template, f.e. content.php

    and it is defined in the functions.php of your child-theme:

    // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
    	if ( $tag_list ) {
    		$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    	} elseif ( $categories_list ) {
    		$utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    	} else {
    		$utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
    	}
    	printf(
    		$utility_text,
    		$categories_list,
    		$tag_list,
    		$date,
    		$author
    	);

    so you can define what you want to see in the

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic