Title: Custom Filter Query
Last modified: April 4, 2023

---

# Custom Filter Query

 *  [Trident Marketing Anglia Ltd](https://wordpress.org/support/users/tridentmarketing/)
 * (@tridentmarketing)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/custom-filter-query/)
 * Hi,
   I’ve created a quick custom filter:
 * `function featured_property_function($query_args){
   $query_args['meta_key'] = '
   _featured';$query_args['meta_value'] = 'yes';$query_args['meta_key'] = '_on_market';
   $query_args['meta_value'] = 'yes';return $query_args;}add_filter('featured_filter','
   featured_property_function');
 * For some reason when I add “featured_filter” to the query id field on the Loop
   Group but its not showing the correct properties.
   Any ideas why that’s not showing?

The topic ‘Custom Filter Query’ is closed to new replies.

 * ![](https://ps.w.org/propertyhive/assets/icon-256x256.gif?rev=3206072)
 * [Property Hive](https://wordpress.org/plugins/propertyhive/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/propertyhive/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/propertyhive/)
 * [Active Topics](https://wordpress.org/support/plugin/propertyhive/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/propertyhive/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/propertyhive/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [query](https://wordpress.org/support/topic-tag/query/)

 * 0 replies
 * 1 participant
 * Last reply from: [Trident Marketing Anglia Ltd](https://wordpress.org/support/users/tridentmarketing/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/custom-filter-query/)
 * Status: not resolved