/** * Prints HTML with meta information for the current post-date/time and author. */ function twentyseventeen_posted_on() { // Get the author name; wrap it in a link. $byline = sprintf(__('by %s', 'twentyseventeen'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . get_the_author() . '</a></span>'); // Finally, let's write all of this to the page. echo '<span class="posted-on">' . twentyseventeen_time_link() . '</span><span class="byline"> ' . $byline . '</span>'; }
post_class(); ?> > <?php if (is_sticky() && is_home()) { echo twentyseventeen_get_svg(array('icon' => 'thumb-tack')); } ?> <header class="entry-header"> <?php if ('post' === get_post_type()) { echo '<div class="entry-meta">'; if (is_single()) { twentyseventeen_posted_on(); } else { echo twentyseventeen_time_link(); twentyseventeen_edit_link(); } echo '</div><!-- .entry-meta -->'; } if (is_single()) { the_title('<h1 class="entry-title">', '</h1>'); } else { the_title('<h2 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h2>'); } ?> </header><!-- .entry-header --> <?php if ('' !== get_the_post_thumbnail() && !is_single()) { ?>