This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Spun content-home.php not showing images in circles

By: a guest on Jan 2nd, 2014  |  syntax: PHP  |  size: 1.02 KB  |  views: 67  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /**
  3.  * @package Spun
  4.  */
  5.  
  6. /*
  7.  * Get the post thumbnail; if one does not exist, try to get the first attached image.
  8.  * If no images exist, let's print the post title instead.
  9.  */
  10. $restore_widont = remove_filter( 'the_title', 'widont' );
  11. $postclass = '';
  12. $spun_image = spun_get_image( get_the_ID() );
  13. /* Modified not to show images in circles */
  14. $spun_image = '';
  15.  
  16. if ( '' != $spun_image ) :
  17.         $thumb = $spun_image;
  18. else :
  19.         $thumb = '<span class="thumbnail-title no-thumbnail">' . get_the_title() . '</span>';
  20.         $postclass = 'no-thumbnail';
  21. endif;
  22.  
  23. if ( 'no-thumbnail' != $postclass ) :
  24.         $thumb .= '<span class="thumbnail-title">' . get_the_title() . '</span>';
  25. endif;
  26. ?>
  27.  
  28. <article id="post-<?php the_ID(); ?>" <?php post_class( $postclass ); ?>>
  29.         <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo $thumb; ?></a>
  30. </article><!-- #post-<?php the_ID(); ?> -->
  31.  
  32. <?php if ( $restore_widont )
  33.                 add_filter( 'the_title', 'widont' ); ?>
clone this paste RAW Paste Data