Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1400
    Rene Jennrich
    Participant

    Hello,

    On my author’s pages I try to find out if the user is an event organizer, too. If I find someone with the same name in my organizers, I try to display a list of events of this user. Though I can display all events using em_display_events, it’s not possible to use this function with arguments.

    Do you have any idea what I’m doing wrong?
    I tried to filter by id or slug, but nothing worked.


    <?php $organizer = em_get_organizers(array('name__like' => $curauth->display_name));
    if ($organizer) { ?>
    <div class="recentbox" id="categories">
    <h4>Veranstaltungen</h4>
    <p id="from_author">von <?php echo $curauth->display_name; ?> </p>
    <div class="recentinner" id="events">
    <?php $args = array (
    'organizers' => 'selected',
    'organizers_arr' => array('slug', array($organizer[0]->slug))
    );
    echo em_display_events($args); ?>
    </div>
    </div>
    <?php } ?>

    #1470
    Rene Jennrich
    Participant

    any hints for me?

    #1497
    Bartosz
    Keymaster

    Hi Rene,

    Sorry, but there was a change in em_display_events() function – we just didn’t make it in the documentation (it will be updated soon). Now you only add organizrers, locations or categories id’s (single ID or array of ID’s just as in tax query of WP_Query)

    So you need to modify your function to:

     $organizer[0]->term_id, // or array($organizer[0]->term_id, $organizer[1]->term_id), etc. 
    );
    echo em_display_events($args); ?>
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.