Skip to content

Instantly share code, notes, and snippets.

@theukedge
Created October 21, 2014 13:30
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 theukedge/37405866c9049902c5e2 to your computer and use it in GitHub Desktop.
Save theukedge/37405866c9049902c5e2 to your computer and use it in GitHub Desktop.
<?php
global $post;
$tmp_post = $post;
$args = array( 'post_type' => 'events', 'numberposts' => $soupnumber, 'no_paging' => '1', 'post_status' => $posttype, 'order' => 'ASC', 'orderby' => $postorder, 'ignore_sticky_posts' => '1', 'category' => $soup_cat);
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
<li><?php the_title(); ?></li>
<?php endforeach; ?>
<?php $post = $tmp_post; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment