← Back to posts list

Adding titles to Gigs with GigPress

February 18, 2014

For joshuaiz.com I wanted to add a page to list my upcoming dj gigs and for this I settled on GigPress. GigPress is very powerful allowing you to customize the various display templates and show gigs by category, artist, venue and more.

One feature that was missing was to add and display a title for gigs. As djs, the party title is much more important than the venue and GigPress just wasnt setup to handle this. After doing a search, others were trying to do the same thing so I was able to find a workaround.

In each of your events, in the ‘Notes’ box just add your title and description like so:

My Awesome Event Title | My awesome event description. Add other performers, or any other info that you want here.

Once you’ve done that, follow the steps below to edit your templates and get the titles/descriptions to display. The key is the pipe separator as you will see below.

Here are all the steps from this post:

  1. Copy shows-list.php and shows-list-start.php to a new folder: ‘gigpress-templates’ in wp-content.

  2. In shows-list-start.php, add this after the ‘artist_label’: <th scope="col" class="gigpress-title"><?php _e("Title", "gigpress"); ?></th>. This adds a new column ‘Title’ to the table header.

  3. Now in shows-list.php, add this just after the td.gigpress-date cell: <?php if($showdata['notes']) : ?><td class="gigpress-title"> <?php $splitNotes = explode("|", $showdata['notes']); ?> <span class="gigpress-info-item"><span class="gigpress-info-title"><?php echo $showTitle = $splitNotes[0]; ?></span></span></td><?php endif; ?>. What this does is grab the part you added in the Gig Notes before the pipe (e.g. the event title).

  4. Then, further down the file, replace the existing notes section with this: <?php if($showdata['notes']) : ?> <span class="gigpress-info-item"><span class="gigpress-info-desc"><?php echo $showDescription = $splitNotes[1]; ?></span></span> <?php endif; ?>. This grabs the part after the pipe (e.g. the event description).

You can see this in action on the gigs page.

← Previous Post
Next Post →