| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- /**
- * Author template
- *
- * @package vamtam/consulting
- */
- $author = get_user_by( 'slug', get_query_var( 'author_name' ) );
- $description = get_the_author_meta( 'description', $author->ID );
- VamtamFramework::set( 'page_title', "<a href='" . get_author_posts_url( $author->ID ) . "' rel='me'>" . ( $author->data->display_name ) . '</a>' );
- rewind_posts();
- get_header();
- ?>
- <div class="row page-wrapper">
- <?php VamtamTemplates::$in_page_wrapper = true; ?>
- <article class="<?php echo esc_attr( VamtamTemplates::get_layout() ) ?>">
- <div class="page-content">
- <?php if ( ! empty( $description ) ) : ?>
- <div class="author-info-box clearfix">
- <div class="author-avatar">
- <?php echo get_avatar( get_the_author_meta( 'user_email', $author->ID ), 60 ); ?>
- </div>
- <div class="author-description">
- <h4><?php echo sprintf( esc_html__( 'About %s', 'vamtam-consulting' ), wp_kses_post( $author->data->display_name ) ); ?></h4>
- <?php echo wp_kses_post( $description ) ?>
- </div>
- </div>
- <?php endif; ?>
- <?php rewind_posts() ?>
- <?php if ( have_posts() ) : ?>
- <?php get_template_part( 'loop', 'archive' ) ?>
- <?php else : ?>
- <h2 class="no-posts-by-author"><?php sprintf( esc_html__( '%s has not published any posts yet', 'vamtam-consulting' ), $author->data->display_name ) ?></h2>
- <?php endif ?>
- </div>
- </article>
- <?php get_template_part( 'sidebar' ) ?>
- </div>
- <?php get_footer(); ?>
|