/
author.php
executable file
·94 lines (91 loc) · 2.14 KB
/
author.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* author pages template part.
* have an archive and a bio for the author
*
* @link http://codex.wordpress.org/Template_Hierarchy
* @package multiloquent
*/
/**
* The template for displaying Author archive pages
*/
get_header();
if ( have_posts() ) {
?>
<div class="jumbotron category-banner">
<div class="container-fluid clearfix">
<header class="profile">
<div class="col-sm-12">
<div class="col-xs-12 col-sm-8">
<h2><?php the_author_meta( 'display_name' ); ?></h2>
<p>
<strong>
<?php
printf(
esc_html__( 'Website: ', 'multiloquent' )
);
?>
</strong>
<?php the_author_link(); ?>
</p>
</div>
<div class="col-xs-12 col-sm-4 text-center">
<figure>
<?php echo get_avatar( get_the_author_meta( 'ID' ) ); ?>
<figcaption class="ratings">
<p>
<?php
printf(
esc_html__( 'Post count: %s', 'multiloquent' ),
$wp_query->found_posts
);
?>
</p>
</figcaption>
</figure>
</div>
</div>
<div class="col-xs-12 divider">
<div class="col-xs-12">
<?php
$description = get_the_author_meta( 'description' );
if ( ! empty( $description ) ) {
echo '<p>' . $description . '</p>';
}
?>
</div>
</div>
</header>
</div>
</div>
<section class="container-fluid post clearfix">
<?php
$colour = $multiloquent->multiloquent_get_random_blue_class();
while ( have_posts() ) {
the_post();
$multiloquent->multiloquent_render_the_archive( $colour );
}
?>
</section>
<section class="container-fluid post clearfix">
<?php
get_template_part( 'advert' );
?>
</section>
<div class="container-fluid post clearfix">
<nav class="navitems text-center">
<ul class="pagination">
<li><?php previous_posts_link( esc_html__( 'Previous Entries', 'multiloquent' ) ); ?></li>
<li><?php next_posts_link( esc_html__( 'Next Entries', 'multiloquent' ) ); ?></li>
</ul>
</nav>
</div>
<?php } else { ?>
<div class="container-fluid post clearfix">
<?php
get_template_part( 'error-snippet' );
?>
</div>
<?php
}
get_footer();