daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Jan 15th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     /** The Era Slider **/
  3.    
  4.     global $wp_query;
  5.     $postid = $wp_query->post->ID;
  6.     $slider_img = get_post_meta($postid, 'era_home_eraslider_slide', true);
  7.     ?>
  8.    
  9.     <pre><?php print_r($wp_query); ?></pre>
  10.    
  11.     <?php if($slider_img) {
  12. ?>
  13.    
  14. <div class="era-slider"> <!-- start div.era-slider -->    
  15.     <ul class="controls">
  16.         <li class="previous"></li>
  17.         <li class="thumbs"></li>
  18.         <li class="next"></li>
  19.     </ul>
  20.    
  21.     <ul class="slider">
  22.     <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
  23.         <li><a href="<?php $slide_link = get_post_meta($post->ID, 'era_home_eraslider_slide_link', true); if($slide_link) {
  24.             echo $slide_link;
  25.         } else { the_permalink(); }?>">
  26.         <img src="<?php echo $slider_img; ?>" alt="<?php if(has_excerpt()) echo get_the_excerpt(); ?>" />
  27.         </a></li>
  28.     <?php endwhile; endif; ?>
  29.     </ul>
  30.    
  31. </div> <!-- end div.era-slider -->
  32.  
  33. <?php } ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top