Support » Theme: Frisco for BuddyPress » [Theme: Frisco for BuddyPress] Google Authorship Error

Viewing 1 replies (of 1 total)
  • Theme Author David Carson

    (@davidtcarson)

    This is not really a Frisco theme issue. I don’t think it’s a BuddyPress issue either. Very specific customization.

    I didn’t look at the plugin being used or proposed solutions. I don’t think this sort of thing requires a plugin. With a little bit of work, you can put this right in the theme.

    By default, single.php/index.php/archive.php templates for the default BuddyPress theme have an .author-box div and the author link will link directly to the author’s BuddyPress profile. For example:

    <p><?php printf( _x( 'by %s', 'Post written by...', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ); ?></p>

    You can change this so that it links to an author archive though.

    <p>By <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php printf( __( '%s' ), get_the_author() ); ?></a></p>

    Then just follow Google’s directions on this and configure for your needs. Most likely all you need to do is put a link to the author’s Google profile in their WordPress profile description and add something like this to the top of your archive.php file (code below taken from TwentyEleven Theme modified slightly to add is_author conditional):

    <?php
    // If on author page and a user has filled out their description, show a bio on their entries.
    if ( is_author() && get_the_author_meta( 'description' ) ) : ?>
    		<div id="author-info">
    			<div id="author-avatar">
    				<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 50 ) ); ?>
    			</div><!-- #author-avatar -->
    			<div id="author-description">
    				<?php the_author_meta( 'description' ); ?>
    			</div><!-- #author-description	-->
    		</div><!-- #author-info -->
    <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: Frisco for BuddyPress] Google Authorship Error’ is closed to new replies.