Skip to content

Instantly share code, notes, and snippets.

@xnau
Last active August 8, 2017 18:53
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 xnau/ebc017059b1ecc747c1797ab2848041f to your computer and use it in GitHub Desktop.
Save xnau/ebc017059b1ecc747c1797ab2848041f to your computer and use it in GitHub Desktop.
Showing results from the current month with Participants Database
<?php
// determine the range of dates to show
$start = date( 'M 01,Y' ); // first day of the current month
$end = date( 'M t,Y' ); // last day of the current month
// now build the shortcode with the date range filter
echo do_shortcode( '[pdb_list filter="date_recorded>=' . $start . '&date_recorded<=' . $end . '" ]' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment