single.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * The template for displaying all single posts
  4. *
  5. * @package taskereasy
  6. * @version 1.0
  7. */
  8. get_header();
  9. taskereasy_blog_banner();
  10. ?>
  11. <!-- Blog -->
  12. <section class="section-padding">
  13. <div class="container">
  14. <div class="row">
  15. <div class="<?php echo (!is_active_sidebar( 'sidebar-7' )) ? esc_attr('col-lg-12') : esc_attr('col-lg-8'); ?>">
  16. <?php
  17. if (have_posts()) :
  18. while (have_posts()) :
  19. the_post();
  20. get_template_part('template-parts/post/content', get_post_format()); ?>
  21. <!-- Author -->
  22. <?php if( get_the_author_meta( 'description' ) != '' ){ ?>
  23. <div class="author-bio">
  24. <?php $get_author_id = get_the_author_meta('ID');
  25. $get_author_gravatar = get_avatar_url($get_author_id); ?>
  26. <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
  27. <img alt="<?php the_author_meta('display_name', $get_author_id); ?>" src="<?php echo esc_url($get_author_gravatar); ?>" class="avatar" height="90" width="90">
  28. </a>
  29. <div class="author-info">
  30. <h3 class="author-info-title"><?php echo esc_html__('Author:', 'taskereasy'); ?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author_meta('display_name', $get_author_id); ?></a></h3>
  31. <p class="author-description"><?php echo get_the_author_meta( 'description', $get_author_id ); ?></p>
  32. </div>
  33. </div>
  34. <?php } ?>
  35. <div class="next-pre-links">
  36. <div class="pre-post-link">
  37. <?php previous_post_link('%link', '&laquo; Previous'); ?>
  38. </div>
  39. <div class="next-post-link">
  40. <?php next_post_link('%link', 'Next &raquo;'); ?>
  41. </div>
  42. </div>
  43. <div class="post-tags"><?php the_tags();?></div>
  44. <?php
  45. if ( comments_open() || get_comments_number() ){
  46. comments_template();
  47. }else{
  48. ?>
  49. <div class="comment-list-wrap">
  50. <p class="lead"><?php echo esc_html__('Comments are closed','taskereasy'); ?></p>
  51. </div>
  52. <?php } ?>
  53. </div>
  54. <?php endwhile; ?>
  55. <?php endif; ?>
  56. <!-- Sidebar -->
  57. <?php if(is_active_sidebar( 'sidebar-7' )) { ?>
  58. <div class="col-lg-4">
  59. <div class="sidebar-wrap">
  60. <?php dynamic_sidebar('sidebar-7'); ?>
  61. </div>
  62. </div>
  63. <?php } ?>
  64. </div>
  65. </div>
  66. </section>
  67. <!-- /Blog -->
  68. <?php
  69. get_footer();
  70. ?>