list of events from category – broken after update

WordPress Event Management, Calendars & Registration Forums General Question list of events from category – broken after update

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 9 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20285

    i used this code at my startpage to show, a list of events from the category “favorit”. after updating wordpress an plugin to the latest versions – it shows not more than one single event. has something of what i used been depractet or changed in way ? thanks in advance…

     <?php
            $events = eo_get_events(array(
                        'numberposts'=> 20,
                        'showpastevents'=>false,
                        'tax_query'=>array( array(
                            'taxonomy'=>'event-category',
                            'field'=>'slug',
                            'terms'=>array('favorit'),
                            ))
                    ));
    
      if($events):
         foreach ($events as $event):
    
              if( eo_is_all_day($event->ID)){
                            $format = ' d. F';
    
        echo '<article class="homepost">';
         echo '<ul>';
              printf(
                 '<li><h1><a href="%s"> %s </a></h1></li>
                 <li><h1>%s bis %s </h1> %s </li>
                 </article> ',
                 get_permalink($event->ID),
                 get_the_title($event->ID),
                 eo_get_the_start($format, $event->ID,null,$event->occurrence_id),
                 eo_get_the_end($format, $event->ID,null,$event->occurrence_id),
                 eo_get_event_meta_list2($event->ID)                    
                 );
    
                        }else{
                            $format = 'D d. F, '.get_option('time_format');
    
        echo '<article class="homepost">';
         echo '<ul>';
              printf(
                 '<li><h1><a href="%s"> %s </a></h1></li>
                 <li><h1>%s </h1> %s </li>
                 </article> ',
                 get_permalink($event->ID),
                 get_the_title($event->ID),
                 eo_get_the_start($format, $event->ID,null,$event->occurrence_id),
                 //eo_get_the_end($format, $event->ID,null,$event->occurrence_id),
                 eo_get_event_meta_list2($event->ID)                    
                 );
                        }
    
                endforeach;
                //echo eo_get_event_meta_list();
    
         echo '</ul>';
      endif;
     ?>
    
    tmksr
    #20290

    Hi tmksr,

    I think this might be a conflict with another plug-in. In tests I get the expected number of events returned.

    I’d recommend deactivating plug-ins to find out if there’s a plug-in conflict (and if so, which one).

    Also, you may want to double check your settings. If all events are in the same series, and you have group events by series enabled in the settings, then you’ll only get one event back.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.