content-single.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
  2. <?php
  3. if(has_post_thumbnail()):?>
  4. <figure class="post-thumbnail">
  5. <?php the_post_thumbnail('full',array('class'=>'img-fluid','alt'=>'blog-image'));?>
  6. </figure>
  7. <?php endif;?>
  8. <div class="post-content">
  9. <?php if(get_theme_mod('spice_software_enable_single_post_date',true) || get_theme_mod('spice_software_enable_single_post_admin',true) || get_theme_mod('spice_software_enable_single_post_category',true) || get_theme_mod('spice_software_enable_single_post_tag',true)): ?>
  10. <?php
  11. if(get_theme_mod('spice_software_enable_single_post_date',true)==true):?>
  12. <?php if(has_post_thumbnail()) { echo '<div class="entry-date">'; }else{ echo '<div class="remove-image">'; } ?>
  13. <a href="<?php echo esc_url(home_url()); ?>/<?php echo esc_html(date('Y/m', strtotime(get_the_date()))); ?>"><span class="date"><?php echo esc_html(get_the_date()); ?></span></a>
  14. <?php
  15. echo '</div>';
  16. endif;?>
  17. <?php if(get_theme_mod('spice_software_enable_single_post_admin',true) || get_theme_mod('spice_software_enable_single_post_category',true) || get_theme_mod('spice_software_enable_single_post_tag',true)): ?>
  18. <div class="entry-meta">
  19. <?php
  20. if(get_theme_mod('spice_software_enable_single_post_admin',true)==true):?>
  21. <a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" alt="<?php esc_attr_e('tag','spice-software'); ?>"><i class="fa fa-user"></i><span class="author"><?php echo esc_html(get_the_author());?>
  22. </span></a>
  23. <?php endif;
  24. if(get_theme_mod('spice_software_enable_single_post_category',true)==true):
  25. if ( has_category() ) :
  26. echo '<i class="fa fa-folder-open"></i><span class="cat-links" alt="'.esc_attr__("Categories","spice-software").'">';
  27. the_category( ', ' );
  28. echo '</span>';
  29. endif;
  30. endif;
  31. if (get_theme_mod('spice_software_enable_single_post_tag', true) == true):
  32. $spice_software_tag_list = get_the_tag_list();
  33. if (!empty($spice_software_tag_list)) {
  34. ?>
  35. <i class="fa fa-tag"></i>
  36. <span class="cat-links posttag"><?php the_tags('', ', ', ''); ?></span>
  37. <?php }
  38. endif;?>
  39. </div>
  40. <?php endif;?>
  41. <?php endif;?>
  42. <header class="entry-header blog-title">
  43. <h4 class="entry-title blog-title"><?php the_title();?></h4>
  44. </header>
  45. <div class="entry-content">
  46. <?php the_content();?>
  47. <?php wp_link_pages( ); ?>
  48. </div>
  49. </div>
  50. </article>