• Resolved tuskmaster

    (@tuskmaster)


    Been at this for hours and now I’m PLEADING for help.

    <?php
     $events = eo_get_events(array(
             'numberposts'=>3,
             'event_start_after'=>'today',
             'showpastevents'=>false,//Will be deprecated, but set it to true to play it safe.
    		  'tax_query'=>array( array(
                             'taxonomy'=>'event-category',
                             'operator' => 'NOT IN',
                             'field'=>'slug',
                             'terms'=>array()))
        ));
    
      if($events):
         echo '
    <ul>';
         foreach ($events as $event):
    
              //Check if all day, set format accordingly
    
    		  $format = ( eo_is_all_day($event->ID) ? get_option('date_format') : get_option('date_format').' '.get_option('time_format') );
              printf(
                 '
    <li><a href="%s"> %s </a> on %s </li>
    ',
    
                 get_permalink($event->ID),
                 get_the_title($event->ID),
    			 get_the_post_thumbnail( $thumbnail->ID, 'thumbnail' ),
                 eo_get_the_start($format, $event->ID,null,$event->occurrence_id)
              );
         endforeach;
         echo '</ul>
    ';
    
      endif;
     ?>

    What am I doing wrong? UGHH.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't get featured image to appear.’ is closed to new replies.