Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. <div class="category3-contentsidebar">
  2. <h2><?php echo esc_attr(get_theme_mod( 'cat_3_title' , '' )); ?></h2>
  3. <?php
  4. $cat3name = esc_attr(get_theme_mod( 'cat_3_name' ));
  5. $numberofpost3 = esc_attr(get_theme_mod( 'cat_3_number' , '4' ));
  6. $the_query = new WP_Query('cat='.$cat3name.'&showposts=1');
  7. while ($the_query->have_posts()) : $the_query->the_post();
  8. ?>
  9. <div class="cat2-item-contentsidebar">
  10. <a href="<?php the_permalink(); ?>">
  11. <?php if ( ! post_password_required() && ! is_attachment() ) :the_post_thumbnail(); endif; ?></a>
  12. <div class="cat3-itemcontent">
  13. <span>
  14. <i class="fa fa-clock-o"></i><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ); _e(' ago', 'clesarmedia'); ?>
  15. </span>
  16. <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
  17. <p><?php echo clesarmedia_excerpt('25'); ?></p>
  18. </div>
  19. </div>
  20. <?php
  21. endwhile;
  22. ?>
  23. <div class="cat2-itemsubcatcontent">
  24. <?php
  25. $clik = 1;
  26. $numberofpostcat3 = $numberofpost3 - $clik;
  27. $the_query = new WP_Query('category_name='.$cat3name.'&showposts='. $numberofpostcat3 .'&offset=1');
  28. while ($the_query->have_posts()) : $the_query->the_post();
  29. ?>
  30. <div class="cat2-item-subcat-contentsidebar">
  31. <a href="<?php the_permalink(); ?>">
  32. <?php if ( ! post_password_required() && ! is_attachment() ) :the_post_thumbnail(); endif; ?></a>
  33. <div id="title-subacat2-contentsidebar">
  34. <a href="<?php the_permalink(); ?>"><?php echo clesarmedia_new_title('...', 8); ?></a>
  35. <p>
  36. <span>
  37. <i class="fa fa-clock-o"></i><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ); _e(' ago', 'clesarmedia'); ?>
  38. </span>
  39. </p>
  40. </div>
  41. </div>
  42. <div class="clear"></div>
  43. <?php
  44. endwhile;
  45. ?>
  46. </div>
  47. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement