Advertisement
Guest User

Untitled

a guest
Oct 6th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. <?php
  2. /*---------------------------------
  3. Single Page Templte
  4. ------------------------------------*/
  5.  
  6. $slider_images = get_post_meta($post->ID, 'rb_post_sliderc2', true);
  7.  
  8. get_header(); ?>
  9.  
  10. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  11.  
  12. <section id="page">
  13.  
  14. <header id="pageHeader">
  15. <h1><?php the_title(); ?></h1>
  16. <a href="#" class="actionButton minimize" data-content="#page" data-speed="600">minimize</a>
  17. </header>
  18.  
  19. <article id="page-<?php the_ID(); ?>" class="contentHolder clearfix">
  20.  
  21. <?php
  22. if($slider_images) {
  23. echo '<div id="postSlider"><div class="slides_container">';
  24. foreach ($slider_images as $key => $value)
  25. if (strpos($value, '.jpg') > 0 || strpos($value, '.jpeg') > 0 || strpos($value, '.JPG') > 0 || strpos($value, '.JPEG') > 0 || strpos($value, '.png') > 0 || strpos($value, '.PNG') > 0 || strpos($value, '.bmp') > 0 || strpos($value, '.BMP') > 0 || strpos($value, '.gif') > 0 || strpos($value, '.GIF') > 0 || is_numeric($value)) {
  26. if(is_numeric($value))
  27. echo '<div>' . wp_get_attachment_image($value, 'large', 0) . '</div>';
  28. else
  29. echo '<div><img heigh="' . get_post_meta($post->ID, 'rb_post_height', true) . 'px;" src="' . $value . '" /></div>';
  30. } else {
  31. echo '<div>' . $value . '</div>';
  32.  
  33. }
  34. echo '</div>';
  35. if(sizeof($slider_images) > 1) {
  36. echo '<div class="sliderControls">
  37. <a href="#" class="sliderBtnPrev">Previous</a>
  38. <a href="#" class="sliderBtnNext">Next</a>
  39. <span class="sliderPagination">1 of 3</span>
  40. </div>';
  41. }
  42. echo '</div>';
  43. }
  44. ?>
  45.  
  46. <?php the_content(); ?>
  47. <?php /* comments_template( '', true ); */ ?>
  48.  
  49. </article>
  50.  
  51. </section>
  52.  
  53. <?php endwhile; ?>
  54.  
  55. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement