Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. <!-- ARTICLE DATE : begin -->
  2. `<div class="article-date">
  3. <i class="ico tp tp-clock2"></i>
  4. <span class="article-date-holder">
  5. <?php if ( lsvr_get_field( 'article_detail_categories_enable', true, true ) ) : ?>
  6. <?php $categories_html = ''; ?>
  7. <?php $terms = wp_get_post_terms( get_the_id(), 'category' ); ?>
  8. <?php foreach ( $terms as $term ) : ?>
  9. <?php $categories_html .= '<a href="' . get_term_link( $term ) . '">' . $term->name . '</a>, '; ?>
  10. <?php endforeach; ?>
  11. <?php if ( $categories_html !== '' ) : ?>
  12. <?php $categories_html = rtrim( $categories_html, ', ' ); ?>
  13. <?php echo sprintf( '%s in %s', get_the_date(), $categories_html ); ?>
  14. <?php else: ?>
  15. <?php echo get_the_date(); ?>
  16. <?php endif; ?>
  17. <?php else: ?>
  18. <?php echo get_the_date(); ?>
  19. <?php endif; ?>
  20. </span>
  21. <?php if ( lsvr_get_field( 'article_detail_author_enable', false, true ) ) : ?>
  22. <span class="article-author">
  23. <?php echo sprintf( 'by %s', get_the_author_posts_link() ); ?>
  24. </span>
  25. <?php endif; ?>
  26. <?php if( comments_open() ) : ?>
  27. <span class="article-comments">
  28. <?php $comment_count = get_comment_count( get_the_ID() ); ?>
  29. <a href="<?php the_permalink(); ?>#comments"><?php echo @sprintf( __( '%d comments', 'lsvrtheme' ), $comment_count['approved'] ); ?></a>
  30. </span>
  31. <?php endif; ?>
  32. </div>`
  33. <!-- ARTICLE DATE : end -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement