Forum Replies Created
Viewing 1 post (of 1 total)
-
AuthorPosts
-
crewrobParticipant
Sure, that seemed to work:
<?php // If we supply no parameters, the default number of events to show per page are fetched, earliest first // Ensure the global $post variable is in scope global $post; $events = tribe_get_events( array( 'eventDisplay' => 'custom', 'posts_per_page' => -1, 'tribe_events_cat' => 'Alaska' )); echo '<table><thead>'; echo '<th>Sailing Event</th>'; echo '<th>Vessel</th>'; echo '<th>Departure</th>'; echo '<th>Description</th>'; echo '</thead>'; // The result set may be empty if ( empty( $events ) ) { echo 'Sorry, nothing found.'; } // Or we may have some to show else foreach( $events as $event ) { setup_postdata( $event ); echo '<tr>'; echo '<td>'.get_the_title( $event ).'</td>'; echo '<td>'.tribe_get_venue( $event ).'</td>'; echo '<td>'.tribe_get_start_date( $event ).'</td>'; echo '<td>'.get_the_excerpt( $event ).'</td>'; echo '</tr>'; } echo '</table>'; ?>
How do I display posts from more than one category?
Thanks again!
-
AuthorPosts
Viewing 1 post (of 1 total)