Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active December 24, 2015 16:58
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 Shelob9/6831552 to your computer and use it in GitHub Desktop.
Save Shelob9/6831552 to your computer and use it in GitHub Desktop.
$todays_date = date('Y-m-d');
$params = array(
'limit' => 4,
'where' => 'DATE( event_date.meta_value ) >= "' . $todays_date . '" AND t.post_status = "publish"'
);
// Run the find
$mypod = pods( 'event', $params );
// Loop through the records returned
while ( $mypod->fetch() ) {
echo '<ul><li><a href="' . $mypod->display( 'permalink' ) . '">' . $mypod->display( 'post_title' ) . "</a></li>";
echo '<li>' . $mypod->display( 'event_date' ) . '</li></ul>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment