Guest User

pojo_recent_post-grid_four.php

a guest
Jan 13th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. <?php
  2. /**
  3. * Recent Post: Grid Four
  4. */
  5.  
  6. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  7.  
  8. global $_current_widget_instance;
  9. ?>
  10. <div class="recent-post grid-item col-md-3 col-sm-6 col-xs-12">
  11. <div class="inbox">
  12. <?php if ( 'show' === $_current_widget_instance['thumbnail'] && $image_url = Pojo_Thumbnails::get_post_thumbnail_url( array( 'width' => '360', 'height' => '240', 'crop' => false, 'placeholder' => true ) ) ) : ?>
  13. <a class="image-link" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
  14. <img src="<?php echo $image_url; ?>" alt="<?php echo esc_attr( get_the_title() ); ?>" class="media-object" />
  15. <div class="overlay-image"></div>
  16. <div class="overlay-title">
  17. <?php if ( 'show' === $_current_widget_instance['metadata_readmore'] ) : ?>
  18. <figcaption>
  19. <?php echo ! empty( $_current_widget_instance['text_readmore_mode'] ) ? $_current_widget_instance['text_readmore_mode'] : __( 'Read More &raquo;', 'pojo' ); ?>
  20. </figcaption>
  21. <?php endif; ?>
  22. </div>
  23. </a>
  24. <?php endif; ?>
  25. <div class="caption">
  26. <?php if ( 'show' === $_current_widget_instance['show_title'] ) : ?>
  27. <h4 class="grid-heading">
  28. <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
  29. </h4>
  30. <?php endif; ?>
  31. <?php if ( 'show' === $_current_widget_instance['except'] ) : ?>
  32. <p><?php echo pojo_get_words_limit( get_the_excerpt(), $_current_widget_instance['except_length_words'] ); ?></p>
  33. <?php endif; ?>
  34. <div class="entry-meta">
  35. <?php if ( 'show' === $_current_widget_instance['metadata_date'] ) : ?>
  36. <span class="entry-date"><?php echo get_the_date(); ?></span>
  37. <?php endif; ?>
  38. <?php if ( 'show' === $_current_widget_instance['metadata_time'] ) : ?>
  39. <span class="entry-time"><?php echo get_the_time(); ?></span>
  40. <?php endif; ?>
  41. <?php if ( 'show' === $_current_widget_instance['metadata_comments'] ) : ?>
  42. <span class="entry-comment"><?php comments_popup_link( __( 'No Comments', 'pojo' ), __( 'One Comment', 'pojo' ), __( '% Comments', 'pojo' ), 'comments' ); ?></span>
  43. <?php endif; ?>
  44. <?php if ( 'show' === $_current_widget_instance['metadata_author'] ) : ?>
  45. <span class="entry-user"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author" class="fn"><?php echo get_the_author(); ?></a></span>
  46. <?php endif; ?>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
Advertisement
Add Comment
Please, Sign In to add comment