Home Forums Event Espresso Premium Sidebar widget link to alt registration page

Sidebar widget link to alt registration page

Posted: August 27, 2015 at 1:30 pm


August 27, 2015 at 1:30 pm

Is there a way to get the links on the sidebar widget to point to the alternate registration pages when applicable instead of the empty pages that are created by default for these events?


  • Support Staff

August 28, 2015 at 4:13 am

Hi Matthew,

Event Espresso should not be creating any blank pages.

Can you link me an example of this please?


August 28, 2015 at 6:51 am

Please obfuscate the urls.

They’re in the sidebar here:


The pages were set up to be alternate registration pages, so this page here:


Shouldn’t exist, since on the event list:


It is linked to an alternate reg page offsite.

  • This reply was modified 4 years, 9 months ago by  Tony. Reason: Removed urls


  • Support Staff

August 28, 2015 at 7:35 am

Ah, Ok.

Its not a blank page but the event EE itself, the widget is not checking to see if an alternative registration page has been set.

Are you ok modifying PHP file? I can provide a quick fix for now, and one will be included within the next update EE.

Within \event-espresso-core-reg\widgets\upcoming_events\EEW_Upcoming_Events.widget.php

Just after line 347 make a little space and add:

$url = $event->external_url() !== NULL && $event->external_url() !== '' ? $event->external_url() : get_permalink( $event->ID() );

Like this –

Then just below that is the line to output the title:

echo '<h5 class="ee-upcoming-events-widget-title-h5"><a class="ee-widget-event-name-a' . $len_class . '" href="' . get_permalink( $event->ID() ) . '">' . $event->name() . '</a></h5>';


get_permalink( $event->ID() )

to $url so it becomes:

echo '<h5 class="ee-upcoming-events-widget-title-h5"><a class="ee-widget-event-name-a' . $len_class . '" href="' . $url . '">' . $event->name() . '</a></h5>';

Or he is a copy of the widget file with that fix applied –

We don’t usually recommend modifying core, but as this will be included within core this is an exception. (The fix included in core may be slightly different, but the same outcome)

The support post ‘Sidebar widget link to alt registration page’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  Tony 4 years, 9 months ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!