Skip to content

@danielbachhuber /gist:21788891d530b71ffbc3 secret
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
if ( ! function_exists( 'woo_author_box' ) ) {
function woo_author_box() {
global $post;
$author_id=$post->post_author;
?>
<?php
if ( is_singular() ) {
$i = new CoAuthorsIterator();
while($i->iterate()) {
?>
<div id="post-author">
<div class="profile-image">
<?php echo get_avatar( get_the_author_meta('ID'), '80' ); ?>
</div>
<div class="profile-content">
<h4>
<?php printf( esc_attr__( 'About %s', 'woothemes' ), get_the_author('description', $author_id) ); ?></h4>
<?php echo get_the_author_meta( 'description'); ?>
<?php if (is_singular()) : ?>
<div class="profile-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'woothemes' ), get_the_author( 'display_name', $author_id ) ); ?>
</a>
</div><!-- #profile-link -->
<?php endif; ?>
</div>
<div class="fix"></div>
</div>
<?php } ?>
<?php
}
else {
global $post;
if ( is_author() )
$author_id = get_queried_object_id();
else
$author_id=$post->post_author;
?>
<div id="post-author">
<div class="profile-image">
<?php echo get_avatar( $author_id, '80' ); ?>
</div>
<div class="profile-content">
<h4>
<?php printf( esc_attr__( 'About %s', 'woothemes' ), get_the_author_meta( 'display_name', $author_id ) ); ?></h4>
<?php echo get_the_author_meta( 'description', $author_id ); ?>
<?php if (is_singular()) : ?>
<div class="profile-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID', $author_id ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'woothemes' ), get_the_author_meta( 'display_name', $author_id ) ); ?>
</a>
</div><!-- #profile-link -->
<?php endif; ?>
</div>
<div class="fix"></div>
</div>
<?php
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.