Last active
August 8, 2017 18:49
-
-
Save xnau/86c99d2c94d4b08e801a81ecb1f9234f to your computer and use it in GitHub Desktop.
Showing the last week's records in Participants Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// determine the range of dates to show | |
$start = date( 'M j,Y', strtotime( '-7 days' ) ); // the date 7 days ago | |
$end = date( 'M j,Y' ); // today's date | |
// 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