shortcode event list – different layout based on category being queried
-
I have a situation where I need to use the shortcode in a couple of different places and need to style and display the returned list returned differently based on the event category being queried. So for instance I have webinars that need to be styled completely differently than trade shows, as well as show different information. I can’t seem to get it to work properly.
I’ve tried
if( $eo_event_loop->have_posts() ){
if(event_category!=”webinar”) {
while( $eo_event_loop->have_posts() ): $eo_event_loop->the_post();
//do this
endwhile; }
else {
while( $eo_event_loop->have_posts() ): $eo_event_loop->the_post();
//style and display the info differently for webinars
endwhile; }
}
and also
if( $eo_event_loop->have_posts() ){
if(event_category!=”webinar”) {
while( $eo_event_loop->have_posts() ): $eo_event_loop->the_post();
//do this
endwhile; }
else {
while( $eo_event_loop->have_posts() ): $eo_event_loop->the_post();
//style and display the info differently for webinars
endwhile; }
}
What am I missing? Any help is much appreciated! Thanks!
- The topic ‘shortcode event list – different layout based on category being queried’ is closed to new replies.