• Resolved Lara C

    (@larissacas)


    Hi…

    I wish to the author name to be alone, without “by” (or “por”, translated to portuguese).

    So I just took the word “by” off the template tags, and then my blog simply doesn’t show the author name.

    I returned then the “by” to it’s place, but it still didn’t come back.

    function elucidate_byline() {
    		printf( __( '', 'elucidate' )

    Why?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Chrisdc1

    (@chrisdc1)

    Hello, If you want to make theme modifications it’s best to make a child theme so you don’t loose your changes next time the theme get’s updated.

    The code you posted above is trying to print an empty string so nothing will show up. Here is the original function:

    function elucidate_byline() {
    	printf( __( 'by', 'elucidate' ) . ' ' . '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_html( get_the_author() )
    	);
    }

    If you want to override the original function in a child them you would just have to remove the bit at the start:

    function elucidate_byline() {
    	printf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_html( get_the_author() )
    	);
    }
    Thread Starter Lara C

    (@larissacas)

    Thank you.

    But, I already replaced the template_tags.php for the original file, and it still empty. Simply, doesn’t show the author name anymore.

    What could be wrong now?

    Theme Author Chrisdc1

    (@chrisdc1)

    Ah ok, how many people have made posts to your website? The theme will only display the byline at all if more than one person has posted.

    Thread Starter Lara C

    (@larissacas)

    Chris, you are awsome!

    It was exactly this, only one author, but just by now. I expect to have many others.

    Thank you very much! It’s working perfectly! =)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The tag "by" has gone…’ is closed to new replies.