subminor Posted September 18, 2009 Share Posted September 18, 2009 Hi, struggling with this guys.... It's a widget for wordpress which shows upcoming 'gigs' in the sidebar. I'm not using it for gigs, but for upcoming shows for a theatre company. The widgit currently displays like this: Oct 28: [City], [County] I would like it to display: Oct 28: [Event Name] Code posted below. Thanks in advance... Sub <?php if ( count($gigs) ) : ?> <ul class="gigs"> <?php foreach ( $gigs as $g ) : $link = array(); foreach ( $args['link'] as $f ) { switch ( $f ) { case 'city': $link[] = $g->cityState; break; case 'venue': $link[] = $g->name; break; case 'eventName': $link[] = $g->eventName; break; } } $link = array_unique($link); foreach ( $link as $key => $value ) { if ( empty($value) ) unset($link[$key]); } ?> <li class="<?php echo dtcGigs::get_gig_css_classes($g) ?>"><?php echo dtcGigs::dateFormat($g->mysqlDate . ' ' . $p->time, (date('Y') == date('Y', strtotime($g->mysqlDate))) ? $args['dateFormat'] : $args['dateFormatYear']) ?>: <a href="<?php echo $g->permalink; ?>"> <?php echo implode(' - ', $link) ?> </a></li> <?php endforeach; ?> </ul> <?php else : ?> <div class="no-gigs"><?php echo $options['no-upcoming']; ?></div> <?php endif; ?> Link to comment https://forums.phpfreaks.com/topic/174691-help-with-a-wordpress-widget/ Share on other sites More sharing options...
subminor Posted September 21, 2009 Author Share Posted September 21, 2009 Any helpers ... Pleeease? Link to comment https://forums.phpfreaks.com/topic/174691-help-with-a-wordpress-widget/#findComment-922185 Share on other sites More sharing options...
subminor Posted September 21, 2009 Author Share Posted September 21, 2009 ah.... Its me... I'm an Idiot!!! [sOLVED!] Link to comment https://forums.phpfreaks.com/topic/174691-help-with-a-wordpress-widget/#findComment-922186 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.