Support » Fixing WordPress » Adding Author name to posts

  • Hi
    I’m using the coraline theme for a single-author blog.
    I would like to add the author name to each post (right next to “posted on…”), and am having a hard time figuring out how to do so. I’ve gone into the loop and tried changing a few things, but have had no luck, and I’m afraid to ruin something if i play around with it too much.
    The blog is located at predictivestream.com

    Any help on this would be appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lironh

    (@lironh)

    tried that. maybe I’m too newbie to understand – where do I put this tag? I tried to put the it into several different places in the loop, and when i did, all it did was make all of my posts disappear.
    Any other help would be appreciated.

    please post in your theme’s forum http://wordpress.org/support/theme/coraline/#postform

    btw: the author output is already implemented in the theme, but suppressed for single-author sites;

    see in functions.php:

    /**
     * Prints HTML with meta information for the current author on multi-author blogs
     */
    function coraline_posted_by() {
    	if ( is_multi_author() && ! is_author() ) {
    		printf( __( '<span class="by-author"><span class="sep">by</span> <span class="author vcard"><a href="%1$s" title="%2$s" rel="author">%3$s</a></span> </span>', 'coraline' ),
    			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    			esc_attr( sprintf( __( 'View all posts by %s', 'coraline' ), get_the_author_meta( 'display_name' ) ) ),
    			esc_attr( get_the_author_meta( 'display_name' ) )
    		);
    	}
    }

    simply remove this section from the conditional check:
    is_multi_author() &&
    add the edited function into functions.php of your child theme.

    Thread Starter lironh

    (@lironh)

    Works!
    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding Author name to posts’ is closed to new replies.