Support

Home Forums Event Espresso Premium Link Event Title to Website URL

Link Event Title to Website URL

Posted: April 12, 2021 at 1:55 pm


ptcbowmans

April 12, 2021 at 1:55 pm

I am trying to find a way to automatically link event title in Events Espresso to the event source url (facebook event page, website or whatever the source is for the original event. In other words, if someone is viewing my calendar and clicks on an event, I want the viewer to be taken to the original source page for the event.


Tony

  • Support Staff

April 12, 2021 at 2:12 pm

Hi there,

Within the EE event in the sidebar you’ll see the ‘Alternative Registration URL’ field.

Add the full URL for the external event there and EE will link directly to it.

It’s shown in this section: https://monosnap.com/file/zqBYyY47kQIR01NpaWuEFiEiK3WFdn


ptcbowmans

April 13, 2021 at 5:42 pm

Is there a snippet to automate this process for all imports?


Tony

  • Support Staff

April 14, 2021 at 2:02 am

My apologies but I don’t follow.

We don’t currently have an event import function within EE4 so may I ask how you are importing the events?


ptcbowmans

April 14, 2021 at 6:47 am

This reply has been marked as private.


Kristin

April 14, 2021 at 11:25 am

This reply has been marked as private.


Tony

  • Support Staff

April 14, 2021 at 12:40 pm

We don’t currently have a filter specificlly for the EE event permalink and whilst EE uses get_permalink() to generate the link (which we could hook into) its going to be pretty inefficient.

However, EE does check for the above external url value when generating the link so rather than hooking in to change the link each time I think the best way forward would be to hook into the WP Event Aggregator function and set the alternative registration url through that as the event is imported/updated through it.

They have 2 hooks available for this:

do_action( 'wpea_after_update_ee4_'.$centralize_array["origin"].'_event', $inserted_event_id, $centralize_array );

do_action( 'wpea_after_create_ee4_'.$centralize_array["origin"].'_event', $inserted_event_id, $centralize_array );

So, yes, it should be fairly simple to set the ‘Alternative Registration URL’ for events imported/updated by it.

However, as I don’t use the above and don’t know enough details on what the values will be within it, what is the value for the wpea_event_origin custom field?

The support post ‘Link Event Title to Website URL’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso