How to link event location to venue website

I received this request on the WordPress.org forum:

Is there a way to assign a link to the “location” field? I’d like to list all events for a specific production on a page and have the “location” field linkable to the theatre address.

By default your events look something like this:

Default event HTML
The default event output where the title and thumbnail link to the production detail page.

Now add the following code to your (child)theme’s functions.php file:

The first parts adds a new ‘Venue URL’ field to the event editor:

Event editor with a Venue URL field

The second part of the code wraps the HTML output of an event location with a link to the venue URL:

The event location now link to the venue website.
The event location now links to the venue website.

Is anyone using it?

Is anyone using it?Do you ever wonder how the Theater for WordPress plugin is used on websites from all over the world? Well, I do.

It is however impossible for me to track usage. The plugin is completely free and can be used anonymously. I therefore started to maintain a showcase page with a list of all implementations that are known to me. People are invited to submit other websites, so the list will hopefully keep growing.

Check it out!