EduardET

Co author - about Author box - Extra

Dec 14th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.27 KB | None | 0 0
  1. <?php
  2. if ( extra_is_post_author_box() ) { ?>
  3.     <div class="et_extra_other_module author-box vcard">
  4.         <div class="author-box-header">
  5.             <h3><?php esc_html_e( 'About The Authors', 'extra' ); ?></h3>
  6.         </div>
  7.         <?php if ( function_exists( 'coauthors_posts_links' ) ) { ?>
  8.         <?php $coauthors = get_coauthors(); ?>
  9.         <?php foreach( $coauthors as $coauthor ) { ?>
  10.         <div class="author-box-content clearfix">
  11.             <div class="author-box-avatar">
  12.                 <?php echo get_avatar( $coauthor->user_email, 170, 'mystery', esc_attr( get_the_author() ) ); ?>
  13.             </div>
  14.             <div class="author-box-description">
  15.                 <h4><a class="author-link url fn" href="<?php echo get_author_posts_url( $coauthor->ID ); ?>" rel="author" title="<?php printf( et_get_safe_localization( __( 'View all posts by %s', 'extra' ) ), $coauthor->display_name ); ?>"><?php echo $coauthor->display_name; ?></a></h4>
  16.                 <p class="note"><?php the_author_meta( 'description', $coauthor->ID ); ?></p>
  17.                 <ul class="social-icons">
  18.                     <?php foreach ( extra_get_author_contact_methods( $coauthor->ID ) as $method ) { ?>
  19.                     <li><a href="<?php echo esc_url( $method['url'] ); ?>" target="_blank"><span class="et-extra-icon et-extra-icon-<?php echo esc_attr( $method['slug'] ); ?> et-extra-icon-color-hover"></span></a></li>
  20.                     <?php } ?>
  21.                 </ul>
  22.             </div>
  23.         </div>
  24.         <?php }} else { ?>
  25.         <div class="author-box-content clearfix">
  26.             <div class="author-box-avatar">
  27.                 <?php echo get_avatar( get_the_author_meta( 'user_email' ), 170, 'mystery', esc_attr( get_the_author() ) ); ?>
  28.             </div>
  29.             <div class="author-box-description">
  30.                 <h4><a class="author-link url fn" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author" title="<?php printf( et_get_safe_localization( __( 'View all posts by %s', 'extra' ) ), get_the_author() ); ?>"><?php echo get_the_author(); ?></a></h4>
  31.                 <p class="note"><?php the_author_meta( 'description' ); ?></p>
  32.                 <ul class="social-icons">
  33.                     <?php foreach ( extra_get_author_contact_methods() as $method ) { ?>
  34.                     <li><a href="<?php echo esc_url( $method['url'] ); ?>" target="_blank"><span class="et-extra-icon et-extra-icon-<?php echo esc_attr( $method['slug'] ); ?> et-extra-icon-color-hover"></span></a></li>
  35.                     <?php } ?>
  36.                 </ul>
  37.             </div>
  38.         </div>
  39.         <?php } ?>
  40.     </div>
  41. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment