everbox_post_meta

Prints HTML with meta information for current post-date, author and comments.

Description

everbox_post_meta(); 

Usage

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

Defined (1)

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

/inc/template-tags.php  
  1. function everbox_post_meta() { 
  2. ?> 
  3. <div class="post-meta"> 
  4. <span class="vcard author"> 
  5. <?php if(is_singular()) { ?> 
  6. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="vcard author" rel="author"><?php echo esc_html( get_the_author() ); ?></a></span> 
  7. <?php } else { ?> 
  8. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" class="vcard author"><?php echo esc_html( get_the_author() ); ?></a></span> 
  9. <?php } ?> 
  10. <span class="divider">•</span> 
  11. <time class="entry-date published" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time> 
  12. <?php if( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 
  13. <span class="divider">•</span> 
  14. <?php if(is_home()) { ?> 
  15. <span class="comments-count"><?php comments_popup_link( __( 'No Comment', 'everbox' ), __( '1 Comment', 'everbox' ), __( '% Comments', 'everbox' ) ); ?></span> 
  16. <?php } else { ?> 
  17. <span class="comments-count"><?php comments_popup_link( __( 'Leave a comment', 'everbox' ), __( '1 Comment', 'everbox' ), __( '% Comments', 'everbox' ) ); ?></span> 
  18. <?php } ?> 
  19. <?php endif; ?> 
  20. </div> 
  21. <!-- END .post-meta --> 
  22. <?php