Title: add_error
Last modified: April 24, 2020

---

# add_error

 *  Resolved [iamthewebb](https://wordpress.org/support/users/iamthewebb/)
 * (@iamthewebb)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/add_error/)
 * Hi,
 * I’m using the #_BOOKINGBUTTON placeholder on my event page and have just installed
   [https://pastebin.com/0fvLcHtC](https://pastebin.com/0fvLcHtC) which is stopping
   people signing up to two events happening at the same time.
    I can see this code
   returns an error but it does not display on the page? The text on the button 
   changes to Booking Error. Try again? Is there a way to display the error the 
   code returns?
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/add_error/#post-12724575)
 * another way is to check your PHP logs to see if there’s any other error that 
   might cause this issue.
 *  Thread Starter [iamthewebb](https://wordpress.org/support/users/iamthewebb/)
 * (@iamthewebb)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/add_error/#post-12724641)
 * oh sorry I should have explained more clearly, the code is working.. just that
   when a user is stopped from booking that is on at the same time I assumed that
   this error would be displayed to the user..
 * `$EM_Booking->add_error(__('You already have a booking during the time of this
   event. Please select another event or cancel your previous booking.', 'events-
   manager'));`
 * Or where exactly does this error go?
 * Is there a way to get #_bookingbutton to display these errors?
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/add_error/#post-12762450)
 * you can try to modify template file at events-manager/templates/placeholders/
   bookingbutton.php
 * to use templates: [http://wp-events-plugin.com/documentation/using-template-files/](http://wp-events-plugin.com/documentation/using-template-files/)
 * eg. wp-content/themes/Your Theme/plugins/events-manager/placeholders/bookingbutton.
   php

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘add_error’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/add_error/#post-12762450)
 * Status: resolved