Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Last active August 9, 2017 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/9cf749183efd52687668 to your computer and use it in GitHub Desktop.
Save lorenzocaum/9cf749183efd52687668 to your computer and use it in GitHub Desktop.
Edit the Events Table View Template Add-on for Event Espresso 4 to link the event name to the single event page

This can be done by relocating one of the templates and making a change to a line of code. This will ensure that your customization is not lost on a software update. Here are the steps:

  1. Login to your WordPress root with your preferred SFTP or FTP client. Using a Mac? Try Transmit. Filezilla and Cyberduck are free options.

  2. Browse to this location:

/eea-events-table-view-template/templates

You'll see two files there:

espresso-events-table-template-toggle.template.php

espresso-events-table-template.template.php

  1. Download a copy of those files above to your computer

  2. Now browse to your child theme:

/wp-content/themes/name-of-your-child-theme

Not using a child theme? A child theme allows you to customize your WordPress theme without losing customizations when you update your theme through WP. Here is how to setup a child theme.

  1. Upload the two files that you downloaded earlier to the location above

  2. Open the espresso-events-table-template.template.php file for editing

At about line 95 you'll see this line of code:

<td class="event_title event-<?php echo $post->ID; ?>"><?php echo $post->post_title; ?></td>
  1. Replace the line above with this:
<td class="event_title event-<?php echo $post->ID; ?>"><a href="<?php echo $registration_url; ?>"><?php echo $post->post_title; ?></a></td>

Then save changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment