Title: Custom Field Key &amp; Insert Tag in All Listings
Last modified: January 12, 2022

---

# Custom Field Key & Insert Tag in All Listings

 *  Resolved [dinmix](https://wordpress.org/support/users/dinmix/)
 * (@dinmix)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/custom-field-key-2/)
 * Hi Guys,
 * I know it’s not possible to create custom badges yet so I create a customs field
   instead. I created a field called Vouchers. Now all I need is to create a page
   to show all listings that accepted Vouchers.
 * I can’t find information on how to do this. I saw there is a Key field on the
   documentation [https://directorist.com/documentation/directorist/customization/custom-fields-on-add-listing-page/](https://directorist.com/documentation/directorist/customization/custom-fields-on-add-listing-page/)
   and I supposed this could be used to pull out the listing with the same key. 
   However, I didn’t see this Key field on the current Version 7.0.8.
 * I can also achieve this if I can add Tag field in All Listing layout.
 * Can you advise on this?
    Thank you
    -  This topic was modified 4 years, 4 months ago by [dinmix](https://wordpress.org/support/users/dinmix/).

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

 *  [Mahdee](https://wordpress.org/support/users/m4hd1bd/)
 * (@m4hd1bd)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/custom-field-key-2/#post-15258445)
 * Hi [@dinmix](https://wordpress.org/support/users/dinmix/), sorry for the delay
   in response.
 * Our current documentation is currently a bit out of date, we’re working on making
   it compatible with the latest version of Directorist.
    Field Keys are no longer
   available for mutation by default. If you want to be able to see it or modify
   it, kindly copy-paste the below code on your theme’s functions.php and you should
   be good to go:
 *     ```
       add_filter('directorist_custom_field_meta_key_field_args', function ($args) {
           $args['type'] = 'text';
           return $args;
       });
       ```
   
 * Regards,
    Mahdi.
 *  Thread Starter [dinmix](https://wordpress.org/support/users/dinmix/)
 * (@dinmix)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/custom-field-key-2/#post-15274885)
 * Thank you Mahdi.
 * This works perfectly. One last question, how can I display all the listings on
   a page using this key?
 * Best Regards
    Din
 *  [Mahdee](https://wordpress.org/support/users/m4hd1bd/)
 * (@m4hd1bd)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/custom-field-key-2/#post-15280480)
 * Hi [@dinmix](https://wordpress.org/support/users/dinmix/),
 * Use this code on your theme’s functions.php,
 *     ```
       add_filter('atbdp_all_listings_query_arguments', 'atbdp_listing_query_arguments_custom');
   
       function atbdp_listing_query_arguments_custom($args)
       {
              if(is_page('page_id/page_slug')){ //page slug (as a string) or page id(as a integer)
                $args['meta_query']['key-field'] = array (
       		 	 'key' => '_key-field', //meta key for that field (must use underscore before the meta-key name)
       			 'value' => 'value', //value that you want to compare against
       			 'compare' => '=',
       		 );
              }
       	//e_var_dump( $args );
       	return $args;
       }
       ```
   
 * Regards,
    Mahdi.
 *  Thread Starter [dinmix](https://wordpress.org/support/users/dinmix/)
 * (@dinmix)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/custom-field-key-2/#post-15282713)
 * Thank you Mahdi
 * I tried it but it doesn’t seem to show any listing. I have added the key-field
   and added the value based on the option value of the checkbox.
 * Would you guys provide paid support?
 *  [Mahdee](https://wordpress.org/support/users/m4hd1bd/)
 * (@m4hd1bd)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/custom-field-key-2/#post-15286754)
 * Hi [@dinmix](https://wordpress.org/support/users/dinmix/),
 * We don’t really provide any Paid Support. But if you need help with anything 
   custom, you can always get in touch with our technical support here: [https://directorist.com/contact](https://directorist.com/contact),
   we’ll help you as much as we can.
 * Regards,
    Mahdi.

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

The topic ‘Custom Field Key & Insert Tag in All Listings’ is closed to new replies.

 * ![](https://ps.w.org/directorist/assets/icon-256x256.gif?rev=3185058)
 * [Directorist: AI-Powered Business Directory, Listings & Classified Ads](https://wordpress.org/plugins/directorist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/directorist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/directorist/)
 * [Active Topics](https://wordpress.org/support/plugin/directorist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/directorist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/directorist/reviews/)

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [Mahdee](https://wordpress.org/support/users/m4hd1bd/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/custom-field-key-2/#post-15286754)
 * Status: resolved