This repository was archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsingle.php
More file actions
53 lines (41 loc) · 1.56 KB
/
single.php
File metadata and controls
53 lines (41 loc) · 1.56 KB
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
<?php
/**
* The Template for displaying all single posts.
*
* @package Designer
*/
get_header();
// Check for author description
$curauth = get_userdata( $post->post_author );
?>
<div id="primary" class="content-area <?php if ( ! $curauth->description ) { echo "no-desc"; } ?>">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<!-- If author has a bio, show it. -->
<?php if ( $curauth->description ) { ?>
<header class="author-info">
<div class="author-profile">
<div class="author-avatar">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" title="<?php esc_attr_e( 'Posts by ', 'designer' ); ?> <?php echo esc_attr( get_the_author() ); ?>">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'designer_author_bio_avatar_size', 100 ) ); ?>
</a>
</div>
<div class="author-description">
<h2><?php printf( __( 'Published by %s', 'designer' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
</div>
</div>
</header><!-- author-info -->
<?php } ?>
<?php designer_post_nav(); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>