WordPress.org

Ready to get started?Download WordPress

Forums

AuthorSure
Customization of Author Archive Page (10 posts)

  1. ginpan
    Member
    Posted 1 year ago #

    How can you add the author’s gravatar on the author archive page next to the author’s name?

    Also on the author archive page, how can you put one border around the gravatar, author’s name, bio and contact info?

    I'm using Thesis 2 and WP 3.5

    http://wordpress.org/extend/plugins/authorsure/

  2. deut28
    Member
    Posted 1 year ago #

    Doesn't look like the author has this feature. I need to know the exact same.

  3. deut28
    Member
    Posted 1 year ago #

    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);
    
    	}
  4. deut28
    Member
    Posted 1 year ago #

    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.

  5. ginpan
    Member
    Posted 1 year ago #

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

  6. deut28
    Member
    Posted 1 year ago #

    So glad I put this here. I needed for another blog...lol. :D

  7. deut28
    Member
    Posted 1 year ago #

    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.

  8. citygate
    Member
    Posted 1 year ago #

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

  9. Russell Jamieson
    Member
    Plugin Author

    Posted 1 year ago #

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

  10. deut28
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.