Jump to content

Help with a Wordpress Widget...


subminor

Recommended Posts

Hi,

 

  :confused: 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  :shrug:

 

 

<?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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.