news.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php if ( $show_media ) : ?>
  2. <div class="post-media">
  3. <?php if ( isset( $post_data['media'] ) ) : ?>
  4. <div class="thumbnail">
  5. <?php if ( has_post_format( 'image' ) || ( isset( $post_data['act_as_image'] ) && $post_data['act_as_image'] ) ) : ?>
  6. <a href="<?php the_permalink() ?>" title="<?php the_title_attribute()?>">
  7. <?php echo $post_data['media']; // xss ok ?>
  8. <?php echo vamtam_get_icon_html( array( // xss ok
  9. 'name' => 'vamtam-theme-circle-post',
  10. ) ); ?>
  11. </a>
  12. <?php else : ?>
  13. <?php echo $post_data['media']; // xss ok ?>
  14. <?php endif ?>
  15. </div>
  16. <?php endif; ?>
  17. </div>
  18. <?php endif ?>
  19. <?php if ( $show_content || $show_title ) : ?>
  20. <div class="post-content-wrapper">
  21. <?php
  22. $show_tax = rd_vamtam_get_optionb( 'post-meta', 'tax' ) && ( ! post_password_required() || is_customize_preview() );
  23. $tags = get_the_tags();
  24. ?>
  25. <?php if ( $show_tax || is_customize_preview() ) : ?>
  26. <div class="post-content-meta">
  27. <div class="vamtam-meta-tax the-categories" <?php VamtamTemplates::display_none( $show_tax ) ?>><span class="icon theme"><?php vamtam_icon( 'vamtam-theme-layers' ); ?></span> <span class="visuallyhidden"><?php esc_html_e( 'Category', 'vamtam-consulting' ) ?> </span><?php the_category( ' ' ); ?></div>
  28. </div>
  29. <?php endif ?>
  30. <?php if ( $show_title ) : ?>
  31. <?php include locate_template( 'templates/post/header.php' ); ?>
  32. <?php endif ?>
  33. <?php get_template_part( 'templates/post/main/actions' ) ?>
  34. <?php if ( $show_content ) : ?>
  35. <div class="post-content-outer">
  36. <?php echo $post_data['content']; // xss ok ?>
  37. </div>
  38. <?php endif ?>
  39. <?php if ( ( $show_tax || is_customize_preview() ) && !!$tags ) : ?>
  40. <div class="post-content-meta">
  41. <div class="the-tags vamtam-meta-tax" <?php VamtamTemplates::display_none( $show_tax ) ?>>
  42. <?php the_tags( '<span class="icon">' . vamtam_get_icon( 'tag' ) . '</span> <span class="visuallyhidden">' . esc_html__( 'Tags', 'vamtam-consulting' ) . '</span> ', ', ', '' ); ?>
  43. </div>
  44. </div>
  45. <?php endif ?>
  46. <div class="vamtam-button-wrap vamtam-button-width-auto vamtam-button-left">
  47. <a href="<?php the_permalink() ?>" target="_self" class="vamtam-button accent3 hover-accent1 button-underline" role="button">
  48. <span class="vamtam-button-text"><?php esc_html_e( 'Read More', 'vamtam-consulting' ) ?></span>
  49. </a>
  50. </div>
  51. </div>
  52. <?php endif; ?>