-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop-single.php
executable file
·53 lines (40 loc) · 1.76 KB
/
loop-single.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
<?php
/**
* The loop that displays a single post.
*
* @package WordPress
* @subpackage Starkers
* @since Starkers HTML5 3.2
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<nav>
<?php previous_post_link( '%link', '' . _x( '←', 'Previous post link', 'starkers' ) . ' %title' ); ?>
<?php next_post_link( '%link', '%title ' . _x( '→', 'Next post link', 'starkers' ) . '' ); ?>
</nav>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<h1><?php the_title(); ?></h1>
<?php starkers_posted_on(); ?>
</header>
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<nav>' . __( 'Pages:', 'starkers' ), 'after' => '</nav>' ) ); ?>
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'starkers_author_bio_avatar_size', 60 ) ); ?>
<h2><?php printf( esc_attr__( 'About %s', 'starkers' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s →', 'starkers' ), get_the_author() ); ?>
</a>
<?php endif; ?>
<footer>
<?php starkers_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'starkers' ), '', '' ); ?>
</footer>
</article>
<nav>
<?php previous_post_link( '%link', '' . _x( '←', 'Previous post link', 'starkers' ) . ' %title' ); ?>
<?php next_post_link( '%link', '%title ' . _x( '→', 'Next post link', 'starkers' ) . '' ); ?>
</nav>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>