Posted: 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. |
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 |
|
|
Is there a snippet to automate this process for all imports? |
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? |
|
|
This reply has been marked as private. |
|
This reply has been marked as private. |
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:
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 |
|
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.