WordPress.org

Support

Support » Plugins and Hacks » Events Manager » [Resolved] [Plugin: Events Manager] Get events for location

[Resolved] [Plugin: Events Manager] Get events for location

Viewing 2 replies - 1 through 2 (of 2 total)
  • There isn’t this (simple) possibility.

    I Have do it manually:

    $dati = EM_Locations::get( array('post_id'=>$post->ID) );
    
                                $query = "SELECT event_slug, recurrence_id, event_id, event_end_date, event_name FROM wp_em_events WHERE location_id = ".$dati[0]->location_id." and event_end_date >= '".date("Y-m-d")."'
                                        AND event_status = 1 AND event_private = 0 AND (recurrence_id = 0 or recurrence_id is null) ORDER BY event_end_date ASC";
    
                                $result = mysql_query( $query );
                                if (mysql_num_rows($result)>0) {
                                	?>
                                    <div class="events">
                                        <h2>Next events</h2>
                                   <?php
                                    // scarto quelli ripetuti
                                    while ($evento = mysql_fetch_assoc($result)) {
                                        echo 'until '.date("F j, Y", strtotime($evento['event_end_date'])).' - <a href="/events/'.$evento['event_slug'].'" title="See event &quot;'.$evento['event_name'].'&quot;">'.$evento['event_name'].'</a><br />';
                                    }
                                    ?></div><?php
                                }
    Plugin Author Marcus

    @netweblogic

    you can use shortcodes e.g.

    [events_list location=x]

    or also use the #_LOCATIONNEXTEVENTS placeholder

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Events Manager] Get events for location’ is closed to new replies.
Skip to toolbar