Support

Home Forums Event Espresso Premium Want Custom Registration Link events to still link to single event page in Table

Want Custom Registration Link events to still link to single event page in Table

Posted: March 29, 2017 at 8:26 pm

Viewing 4 reply threads


tclubb

March 29, 2017 at 8:26 pm

I’m already using a customized event table template, so I’m comfortable playing in there, but just don’t see how from that file to make events in the table that have a custom registration link point to the single event page for that event rather than the custom registration link in the event table. I want my users to have to hit the single event page to read more about it before they’re bounced off my site to the custom registration url.


Josh

  • Support Staff

March 30, 2017 at 8:22 am

Hi there,

You’ll find the code around line 90:

$registration_url = !empty($external_url) ? $post->EE_Event->external_url() : $post->EE_Event->get_permalink();

and you can change it so it does this instead:

$registration_url = $post->EE_Event->get_permalink();


tclubb

March 30, 2017 at 7:50 pm

Thanks for the response. I tried your advice, and while it looks like it should work, and reading the code, it should work, nothing changes. So it would appear that get_permalink() calls the external_url() function perhaps in the plugin itself for event posts with an external registration url.


Tony

  • Support Staff

March 31, 2017 at 3:38 am

That’s correct it does, the get_parmalink() wrapper function the EE_EVent object has checks for an external URL and returns that if it’s available. So in place of the code Josh provided you’ll need:

$registration_url = get_permalink( $post->ID );

Then for ANY event on the table the standard permalink will be returned.


tclubb

March 31, 2017 at 1:40 pm

Awesome. That worked marvelously, thanks for your help, both of you!

Viewing 4 reply threads

The support post ‘Want Custom Registration Link events to still link to single event page in Table’ 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