Home Forums Event Espresso Premium Event Search goes to 404 page

Event Search goes to 404 page

Posted: August 29, 2012 at 11:35 am

Simon Haddleton

August 29, 2012 at 11:35 am


I’ve got the event search shortcode set up on my site, when I type the name of an event it appears, I click it, but then I get taken to a 404 page. I’m taken to …/?page_id=4&ee=2, whereas the event is actually located at …/?page_id=142&ee=2 – my Event Registration page has id 142.

Any pointers?

Thank you 🙂

Chris Reynolds

  • Support Staff

August 29, 2012 at 1:23 pm

I was having a similar issue on my test install. We have an open ticket for this. In the meantime, you can try switching to “pretty permalinks” by going to your WordPress Permalink settings and using one of the non-default options (anything that isn’t ?p=123 for permalinks). Another possibility is putting the event search shortcode on the same page as the ESPRESSO_EVENTS shortcode.

Seth Shoultes

  • Support Staff

August 29, 2012 at 3:17 pm

Sorry for the trouble!

I was just looking into the bug ticket we have for this and found the problem. We are declaring page_id=4 in the code! That is totally my fault and will have it fixed in the next update.

In the meantime, if you want to fix it yourself find the following line of code in the event-espresso/includes/shortcodes.php file:

echo '{ url:"?page_id=4&ee='.$event->id.'", value: "'.stripslashes_deep($event->event_name) . $venue_name .'", id: "'.$event->id.'" },';

Replace page_id=4 with your Event Registration page id.

Hope that helps!

Seth Shoultes

  • Support Staff

August 29, 2012 at 3:24 pm

Or actually. You can just replace:

echo '{ url:"?page_id=4&ee='.$event->id.'", value: "'.stripslashes_deep($event->event_name) . $venue_name .'", id: "'.$event->id.'" },';

With this:

echo '{ url:"'.espresso_reg_url($event->id).'", value: "'.stripslashes_deep($event->event_name) . $venue_name .'", id: "'.$event->id.'" },';

Simon Haddleton

September 2, 2012 at 6:12 am

Brilliant, works a charm.

Cheers for the quick response! Great plugin.

The support post ‘Event Search goes to 404 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