Created
November 4, 2014 00:21
-
-
Save jesseeproductions/739c9a0c00f494ccc0d7 to your computer and use it in GitHub Desktop.
Check if there are Upcoming Events in the Events Calendar
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 | |
/** | |
* Check if there are Upcoming Events in the Events Calendar | |
* @3.8 | |
*/ | |
$events = tribe_get_events( array('eventDisplay'=> 'list')); | |
// Check if any events were returned | |
if ( count( $events ) > 0 ) { | |
echo "Events"; | |
} | |
else { | |
echo "No Events"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment