Guest User

Untitled

a guest
Nov 16th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
  2.     setup_postdata($post);
  3. ?> 
  4.     <!-- slide -->
  5.     <li>
  6.         <?php $posts = get_field('cf-rotator-rel');
  7.         if( $posts ): foreach( $posts as $post): setup_postdata($post);
  8.             $rotatorurl = get_permalink(); //grabs the permalink to the event just fine!
  9.             $postid = $post->ID; //tested this, it's pulling the ID of the event!
  10.             $startdate = eo_get_the_start('M j', $postid,null,$post->occurrence_id); //here's the bit
  11.         ?>
  12.         <a href="<?php if ($rotatorurl) { echo $rotatorurl; } else { echo '#'; } ?>" class="img-frame">
  13.             <h2>EXHIBIT: <?php echo $startdate; //this isn't returning anything ?></h2>
  14.         </a>
  15.         <?php endforeach; wp_reset_postdata(); endif; ?>
  16.     </li>
  17. <?php
  18. endwhile; endif;
  19. $wp_query = null;
  20. $wp_query = $temp;
  21. wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment