twentyfourteen_posted_on

Print HTML with meta information for the current post-date/time and author.

Description

twentyfourteen_posted_on(); 

Usage

  1. if ( !function_exists( 'twentyfourteen_posted_on' ) ) { 
  2. require_once '/inc/template-tags.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyfourteen_posted_on(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/template-tags.php  
  1. function twentyfourteen_posted_on() { 
  2. if ( is_sticky() && is_home() && ! is_paged() ) { 
  3. echo '<span class="featured-post">' . __( 'Sticky', 'twentyfourteen' ) . '</span>'; 
  4.  
  5. // Set up and print post meta information. 
  6. printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',  
  7. esc_url( get_permalink() ),  
  8. esc_attr( get_the_date( 'c' ) ),  
  9. esc_html( get_the_date() ),  
  10. esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),  
  11. get_the_author() 
  12. );