WordPress.org

Support

Support » Plugins and Hacks » Customization of Author Archive Page

Customization of Author Archive Page

Viewing 9 replies - 1 through 9 (of 9 total)
  • Doesn’t look like the author has this feature. I need to know the exact same.

    This is what I used and it worked for a while. Not sure what happened because instead of authors gravatar, its showing default image.

    private static function show_author_profile($user) {
    
    		$id = $user->ID;
    
    		if ($archive_heading = self::get_option('author_archive_heading'))
    
    			$subtitle = sprintf('<p id="authorsure-posts-heading">%1$s</p>',$archive_heading);
    
    		else 
    
    			$subtitle = '';
    
    		if 	( self::is_author($user))
    
    				$gravatar = get_avatar( get_the_author_meta('ID'), 120);
    
    			echo sprintf('%1$s<div id="authorsure-author-profile">' . $gravatar . '%2$s %3$s</div><div class="clear"></div>%4$s',
    
    				self::get_title($id), self::get_bio($id), self::get_profiles($user), $subtitle);
    
    	}

    Okay, somehow I needed WordPress SEO plugin by Joost de Valk in order for this line:

    $gravatar = get_avatar( get_the_author_meta('ID'), 120);

    to actually work. I deactivated the plugin because I was trying to find out which plugin was generating “Last updated by” at the top of archive and tag pages. It was AuthorSure. So I just unchecked that option. Problem solved. Hope this helps.

    Thanks for trying to work it out. Will give it a try.

    So glad I put this here. I needed for another blog…lol. 😀

    Just thought I’d give an update if anyone is interested. It would be nice if showing author’s avatar on the author page was optional. When the code above is applied to WP 3.5, it didn’t work. So I came up with this:

    private static function show_author_profile($user) {
    		$id = $user->ID;
    		if ($archive_heading = self::get_option('author_archive_heading'))
    			$subtitle = sprintf('<p id="authorsure-posts-heading">%1$s</p>',$archive_heading);
    		else
    			$subtitle = '';
    			if ( self::is_author($user))
    
    				echo sprintf('%1$s<div id="authorsure-author-profile">%2$s %3$s %4$s</div><div class="clear"></div>%5$s',
    				self::get_title($id), self::get_avatar($id), self::get_bio($id), self::get_profiles($user), $subtitle);
    	}

    Basically, I added this to sprintf, self::get_avatar($id), and another placeholder.

    Downloaded the plugin and installed.
    Can’t get my head around Step 4…
    What do i do next?

    Plugin Author Russell Jamieson

    @powerblogservice

    @deut28 Thanks for your comments. I will add an optional avatar on the Author Page in the next release.

    @citygate, go to Settings and customize your plugin I suppose.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Customization of Author Archive Page’ is closed to new replies.