Skip to content

Instantly share code, notes, and snippets.

@wirlen
Created March 27, 2013 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wirlen/5254484 to your computer and use it in GitHub Desktop.
Save wirlen/5254484 to your computer and use it in GitHub Desktop.
ul id="featured1" data-orbit data-options="timer_speed:5000;">
<?php
query_posts(array( 'post_type' => 'slide', 'post_per_page' => 4, 'showposts' => 4) );
$x = 1;
while(have_posts() ) : the_post();
echo '<li data-orbit-slide="service-'.$x.'">';
$x++;
echo'<img src="'; the_field('slider_image'); echo'"/>';
echo '<div class="orbit-caption">';
echo'<h2>'; the_title(); echo '</h2>';
echo '<h3>'; the_field('subheader'); '</h3>';
echo '</div></li>';
endwhile;
wp_reset_query();
?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment