Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. <?php
  2. /**
  3. * The featured posts template file.
  4. *
  5. *
  6. * @package WordPress
  7. * @subpackage Obscure
  8. */
  9. ?>
  10. <?php if(get_option("obscure_featured_type") <> "opt_3") : ?>
  11. <?php if(get_option("obscure_featured_type") == "opt_0") : ?>
  12. <div id="featured" class="clearfix">
  13. <?php $featured = new WP_Query('showposts=5&cat=' . get_post_gallery_options());
  14. if ($featured->have_posts()) : $nothing_yet = true; ?>
  15. <div class="hook-title">Recent Podcast'<?php if($featured->post_count > 1) { echo 's'; }?></div>
  16. <div class="slider">
  17. <?php while ($featured->have_posts()) : $featured->the_post();
  18. if(has_post_thumbnail( $post->ID )) :
  19. $nothing_yet = false;
  20. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large' ); ?>
  21.  
  22. <a href="<?php the_permalink(); ?>">
  23. <img alt="<?php the_title(); ?>" src="<?php bloginfo("template_directory"); ?>/timthumb.php?src=<?php echo $image[0]; ?>&w=608&h=280&zc=1" width="608" height="280" class="post_image" />
  24. <div><span><?php the_title(); ?></span></div>
  25. </a><!-- end -->
  26. <?php
  27. endif;
  28. if($nothing_yet) {
  29. echo '<img src="'. get_bloginfo('template_directory') .'/library/images/nothing.png" border="0" align="nothing in here yet" />';
  30. }
  31. endwhile; ?>
  32. </div><!-- end .slider -->
  33. <div id="slider-nav"><!-- slider navigation --></div>
  34. <?php endif; ?>
  35. </div>
  36. <?php elseif(get_option("obscure_featured_type") == "opt_1") : ?>
  37. <div id="single_video">
  38. <?php
  39. $video_code = stripslashes(get_option("obscure_single_video"));
  40. $video_code = $video_code <> "" ? $video_code : "No video code found!";
  41. $video_code = preg_replace('/width="(.*?)"/', 'width="608"', $video_code);
  42. $video_code = preg_replace('/height="(.*?)"/', 'height="280"', $video_code);
  43.  
  44. echo $video_code;
  45. ?>
  46. </div>
  47. <?php endif; ?>
  48. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement