Title: Custom conditional based on value
Last modified: August 31, 2016

---

# Custom conditional based on value

 *  Resolved [GnuandYou](https://wordpress.org/support/users/gnuandyou/)
 * (@gnuandyou)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-conditional-based-on-value/)
 * I have already created a custom conditional for some custom attributes however
   I’m looking to create one based on a selected value for: #_ATT{ticketType}{Standard
   |SoldOut}
 * I haven’t had much luck targeting the actual key value for the attribute Standard
   or Sold Out in this case.
 * Any input would be awesome!
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

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

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-conditional-based-on-value/#post-6940445)
 * did you already tried this link – [http://snippets.webaware.com.au/snippets/events-manager-conditional-placeholders-for-custom-attributes/](http://snippets.webaware.com.au/snippets/events-manager-conditional-placeholders-for-custom-attributes/)?
 * eg.
    `if ( $EM_Event->event_attributes['ticketType'] == 'Standard' ){ ... }`
 *  Thread Starter [GnuandYou](https://wordpress.org/support/users/gnuandyou/)
 * (@gnuandyou)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-conditional-based-on-value/#post-6940492)
 * Gelo,
 * I did see that and its how I created my filter for another custom attribute. 
   However for some reason I can’t get it to respect what is selected.
 * Here is my original code => [http://pastebin.com/Fffpy78G](http://pastebin.com/Fffpy78G)
 * I added what you said code now looks like this => [http://pastebin.com/UVvkHbHH](http://pastebin.com/UVvkHbHH)
 * Let me know if I’m missed something!
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-conditional-based-on-value/#post-6940582)
 * it seems correct for me however did you try ticketType instead of TicketType ?
 *  Thread Starter [GnuandYou](https://wordpress.org/support/users/gnuandyou/)
 * (@gnuandyou)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-conditional-based-on-value/#post-6940603)
 * Gelo,
 * Yes I tired ticketType and I’m still having no luck.
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-conditional-based-on-value/#post-6940616)
 * hmm, you might need to a developers assistance to debug this further as per the
   support policy – [http://eventsmanagerpro.com/support-policy/](http://eventsmanagerpro.com/support-policy/)

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

The topic ‘Custom conditional based on value’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/custom-conditional-based-on-value/#post-6940616)
 * Status: resolved