Title: Custom fields search issues
Last modified: August 30, 2016

---

# Custom fields search issues

 *  Resolved [kimdebling](https://wordpress.org/support/users/kimdebling/)
 * (@kimdebling)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-fields-search-issues/)
 * Hi there,
 * I’ve been reading the documentation and racking my brains so I’m hoping someone
   will be able to help me. I’m happy to fork out for the pro version to get the
   support but I don’t think I need any of the pro features and I’m worried that
   perhaps the plugin can’t do what I need!
 * I’ve added a custom attribute in the Settings/General Options
    #_ATT{Sex}{Any
   |Male|Female}
 * I’ve modified the way an event looks to show the sex
 * Now I need to be able to search events. I’ve added code to functions.php based
   on [this tutorial](http://www.beetlebrow.co.uk/about-us/beetle-blog/wordpress-event-manager-plugin-adding-custom-event-attribute)
 * Which with changed text now looks like this:
    [http://www.kimberlyann.co.uk/wp-content/uploads/2015/12/functionsphp.txt](http://www.kimberlyann.co.uk/wp-content/uploads/2015/12/functionsphp.txt)
 * This stops the search function from working completely. When I take out the last
   line add_filter( ’em_events_build_sql_conditions’, ‘my_sex_conditions’,1,2); 
   and instead try different functions from the tutorials in the documentation:
   
   [http://wp-events-plugin.com/tutorials/creating-conditional-placeholders-for-events/](http://wp-events-plugin.com/tutorials/creating-conditional-placeholders-for-events/)
   [http://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/](http://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/)
   I’m getting nowhere. I can get the search working again but it completely ignores
   filtering the results by sex.
 * Any ideas?
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

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

 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-fields-search-issues/#post-6880333)
 * Hi,
 * In your version you still have “Abi” and “Lou” included from the original example.
   You’d need to change those to values you actually want to check for.
 *  Thread Starter [kimdebling](https://wordpress.org/support/users/kimdebling/)
 * (@kimdebling)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/custom-fields-search-issues/#post-6880335)
 * Hi, yes I noticed that – I changed it and it still didn’t work. I even tried 
   using it as-is and adding a ‘teacher’ field and it still didn’t work. I’m now
   trying a different search plugin!

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

The topic ‘Custom fields search issues’ 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/)

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)

 * 2 replies
 * 2 participants
 * Last reply from: [kimdebling](https://wordpress.org/support/users/kimdebling/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/custom-fields-search-issues/#post-6880335)
 * Status: resolved