Conditional based on scope using PHP
-
I would like to conditionally display event content depending on whether or not there is a current or future event. On my homepage I am using the query:
<?php if (class_exists('EM_Events')) { ?>
to display a list of the 3 most upcoming events with
<?php echo EM_Events::output( array('limit'=>3,'order'=>'asc','orderby'=>'event_start_date') ); ?>
IF there are no current or upcoming events I would like to show a highlight of the 3 latest blog posts. I have the blog posts displaying fine, but I need to wrap them into this kind of conditional and can’t seem to find any info on how to do this.
Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Conditional based on scope using PHP’ is closed to new replies.