Title: add multiple search terms (custom fields)
Last modified: March 10, 2022

---

# add multiple search terms (custom fields)

 *  Resolved [nummernegen](https://wordpress.org/support/users/nummernegen/)
 * (@nummernegen)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/add-multiple-search-terms-custom-fields/)
 * Hello,
 * Thanks to this snippet I’ve added 1 custom field _my_meta_field to var $searchable_meta_keys.
   
   How do I add a second or more custom fields to the search terms? Perhaps only
   just a matter of proper php coding, nevertheless I feel stranded. Perhaps anyone
   could point me out. Thank you
 *     ```
       function my_wpjm_meta_key_dm() {
           global $wpdb, $job_manager_keyword;
           $searchable_meta_keys[] = '_my_meta_field';
           return $searchable_meta_keys;
       }
       add_filter('job_listing_searchable_meta_keys', 'my_wpjm_meta_key_dm');
       ```
   

Viewing 1 replies (of 1 total)

 *  [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * (@gaurav984)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/add-multiple-search-terms-custom-fields/#post-15445266)
 * Hi there,
 * Thanks for reaching out. The `$searchable_meta_keys[]` is an array. In the code
   you shared the array has one value `_my_meta_field` you can add more values to
   this variable for adding a second or more custom fields to the search terms.
 * Best,

Viewing 1 replies (of 1 total)

The topic ‘add multiple search terms (custom fields)’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager/assets/icon-256x256.gif?rev=2975257)
 * [WP Job Manager](https://wordpress.org/plugins/wp-job-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/add-multiple-search-terms-custom-fields/#post-15445266)
 * Status: resolved