Posted: October 16, 2012 at 10:19 am
|
I am able to get the event ID from the $data_soure array, but I can’t figure out how to get the unique event identifier. I’m trying to create a link back to the event post, and I wanted to use the unique event identifier to create it. If I could get the post URL, that would work too. Anyone know how to do this? |
Why do you need the unique event identifier instead of the event_id? Event Espresso urls are typically in this format: |
|
|
I want the URL for the event post, not the registration post. Does that make sense? The URL I was hoping to grab the URL with regex from the unique event identifier, unless there’s an easier way to link back to the post, and not the registration page. |
Hi Noah — Sorry about the delay in the response.
No, that doesn’t make sense. Are you using custom post types? If so, AFAIK, the slug comes from the event name, not the unique event identifier. The unique event identifier is really only used when you’re using the single event shortcode. In 3.2 we’re using “pretty” permalinks and that will behave more like a regular post slug, but right now that unique event identifier isn’t used for much beyond the shortcode. Everything uses the event ID. |
|
|
Hi Chris: I’ll show you an example. Here’s a page that uses the EVENT_LIST shortcode: http://ravissustainable.net/courses-events/ The links go to the registration pages. The Edmonton one on the list (EVENT_LIST), should match the Edmonton one on the right (Event Espresso Upcoming Events Widget), which goes to the event post. I was just wondering what code I could use to create links to events posts, instead of event registration pages. Hope that makes more sense. 🙂 |
You need to not be using EVENT_LIST if you’re using custom post types. You should be using the page-event_list.php template in the The only other workaround you could do is set an alternate registration URL to the event post, but you’d need to do it on every single event. |
|
|
@Chris I got it to work by adding the variable get_permalink($event->post_id) to event_list.php and changing $registration_url to this variable in event_list_display.php. I guess the programmer before me already had this added to the widget.php. Thanks! |
Thanks. I’ll have to test that. Glad you got it working. |
|
The support post ‘How do I get the unique event identifier after event confirmation?’ 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.