wp/wp-content/themes/twentythirteen/author.php
author ymh <ymh.work@gmail.com>
Tue, 09 Jun 2015 03:35:32 +0200
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
permissions -rw-r--r--
upgrade wordpress + plugins
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * The template for displaying Author archive pages
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 *
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
     5
 * @link https://codex.wordpress.org/Template_Hierarchy
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
 * @package WordPress
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
 * @subpackage Twenty_Thirteen
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
 * @since Twenty Thirteen 1.0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
get_header(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
	<div id="primary" class="content-area">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
		<div id="content" class="site-content" role="main">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
		<?php if ( have_posts() ) : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
			<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
				/*
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
				 * Queue the first post, that way we know what author
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
				 * we're dealing with (if that is the case).
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
				 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
				 * We reset this later so we can run the loop
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
				 * properly with a call to rewind_posts().
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
				 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
				the_post();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
			?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
			<header class="archive-header">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
				<h1 class="archive-title"><?php printf( __( 'All posts by %s', 'twentythirteen' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
			</header><!-- .archive-header -->
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
			<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
				/*
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
				 * Since we called the_post() above, we need to
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
				 * rewind the loop back to the beginning that way
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
				 * we can run the loop properly, in full.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
				 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
				rewind_posts();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
			?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
			<?php if ( get_the_author_meta( 'description' ) ) : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
				<?php get_template_part( 'author-bio' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
			<?php endif; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
			<?php /* The loop */ ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
			<?php while ( have_posts() ) : the_post(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
				<?php get_template_part( 'content', get_post_format() ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
			<?php endwhile; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
			<?php twentythirteen_paging_nav(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
		<?php else : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
			<?php get_template_part( 'content', 'none' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
		<?php endif; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
		</div><!-- #content -->
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
	</div><!-- #primary -->
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
<?php get_sidebar(); ?>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    62
<?php get_footer(); ?>