Support

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

Viewing 3 reply threads


Christina

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?


Tony

  • 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?


Christina

August 28, 2015 at 6:51 am

Please obfuscate the urls.

They’re in the sidebar here:

**REMOVED**

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

**REMOVED**

Shouldn’t exist, since on the event list:

**REMOVED**

It is linked to an alternate reg page offsite.

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


Tony

  • 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 – http://take.ms/rd0uQ

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>';

Change:

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 – http://take.ms/3qSKz

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)

Viewing 3 reply threads

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.

Event Espresso