Access Event List Info from database
-
I am using the Event List plugin in a custom theme and it is working quite nicely. I use PHP to access the start_date and title info from the wp_event_list table and display it in the sidebar of the site. However, most recently it quit displaying the most recent events and I was wondering if you might be able to tell me where things are going awry. I am posting my PHP below and if it helps, the site url is http://www.sauganashchamber.org
Thanks in advance!!
<?php global $wpdb; $result = $wpdb->get_results( "SELECT start_date, title FROM wp_event_list WHERE start_date >= CURDATE() LIMIT 7" ); /*$result = $wpdb->get_results( "SELECT * FROM wp_event_list LIMIT 7" );*/ foreach ( $result as $event ) {?> <h4 class="green bold"><?php echo $event->start_date; ?></h4> <h3 class="arial bold italic"><?php echo $event->title; ?> <a class="read-more arial bold" href="index.php?page_id=61">Read more</a></h3> <div style="width:100%; height:1px; background:#D6E6E3;"></div><!-- horizontal rules --> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Access Event List Info from database’ is closed to new replies.