Advertisement
Uranbold

loop.php

Jun 19th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. <div class="archive-heading">
  2. <?php
  3. $react = tw_react_meta();
  4. if(!empty($react['title'])){
  5. echo '<h1 class="archive-title">';
  6. if(!empty($react['image'])){
  7. echo '<img class="react-icon" src="'.esc_url($react['image']).'" />';
  8. }
  9. echo '<span>'.esc_html($react['title']).'</span></h1>';
  10. }
  11. ?>
  12. </div>
  13. <div class="content-area">
  14.  
  15. <?php if(have_posts()){ ?>
  16.  
  17. <div class="tw-blog">
  18. <div class="blog-row style_1">
  19. <div class="blog-column">
  20. <div class="column-posts">
  21. <?php
  22. while (have_posts()) : the_post();
  23.  
  24. global $coolist_options, $tw_react_options;
  25. ?>
  26.  
  27. <article id="post-<?php the_ID(); ?>" <?php post_class('grid'); ?>>
  28. <?php
  29. if (has_post_thumbnail()) {
  30. $data = '';
  31. if (coolist_metabox('parallax_post')) {
  32. wp_enqueue_script('skrollr.min');
  33. $img = coolist_image('coolist_grid_thumb2', true);
  34. $data = ' style="background-image: url(' . $img['url'] . ');"' .
  35. ' class="parallax-img"' .
  36. ' data-top-bottom="background-position: 50% 0;"' .
  37. ' data-center="background-position: 50% -100px;"' .
  38. ' data-bottom-top="background-position: 50% -200px;"' .
  39. ' data-anchor-target=".entry-media a"';
  40. }
  41. echo '<div class="entry-media"><a href="' . get_permalink() . '" ' . ($data) . '>';
  42. echo get_the_post_thumbnail($post->ID, 'coolist_grid_thumb');
  43. $react = get_post_meta($post->ID, 'react', true);
  44. if(!empty($react) && !empty($tw_react_options[$react]['image'])){
  45. echo '<div class="react-overlay"><img src="'.esc_url($tw_react_options[$react]['image']).'" /></div>';
  46. }
  47. echo '</a></div>';
  48. }
  49.  
  50. echo '<div class="entry-post">';
  51.  
  52. echo '<div class="entry-cats">' . coolist_cats() . '</div>';
  53.  
  54. echo '<h2 class="entry-title"><a href="' . esc_url(get_permalink()) . '">' . get_the_title() . '</a></h2>';
  55.  
  56. echo '<div class="entry-footer entry-meta">';
  57. echo coolist_post_share();
  58. echo '<span class="comment-count">' . coolist_comment_count() . '</span>';
  59. echo '<span class="date"><a href="' . get_permalink() . '">' . get_the_time(get_option('date_format')) . '</a></span>';
  60. echo '</div>';
  61.  
  62. echo '</div>';
  63. ?>
  64. </article><?php
  65. $coolist_options['post__not_in'][] = $post->ID;
  66.  
  67. endwhile;
  68. ?>
  69.  
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <?php } else {
  75. echo '<div class="reaction-notfound">';
  76. echo esc_html__('Check out our awesome posts and Vote for your Reaction.', 'coolist');
  77. echo '</div>';
  78. } ?>
  79. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement