Last active
June 12, 2024 13:49
-
-
Save propertyhive/10e6355c129e9e339101ad787d75b263 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'elementor/query/myonmarketpropertyquery', 'elementor_query_on_market_only' ); | |
function elementor_query_on_market_only( $query ) | |
{ | |
$meta_query = $query->get('meta_query'); | |
$new_meta_query = $meta_query; | |
$new_meta_query[] = array( | |
'key' => '_on_market', | |
'value' => 'yes' | |
); | |
$query->set( 'meta_query', $new_meta_query ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment