Last active
May 7, 2024 09:27
-
-
Save propertyhive/94adb0b133a154b86fb0d10decf3ca90 to your computer and use it in GitHub Desktop.
This file contains 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/investmentquery', 'elementor_query_investment_only' ); | |
function elementor_query_investment_only( $query ) | |
{ | |
PH()->query->property_query( $query ); | |
// Set the custom post type | |
$query->set( 'post_type', [ 'property' ] ); | |
$tax_query = $query->get('tax_query'); | |
$new_tax_query = $tax_query; | |
$new_tax_query[] = array( | |
'taxonomy' => 'property_type', | |
'terms' => array(79), | |
'operator' => 'IN', | |
); | |
$query->set( 'tax_query', $new_tax_query ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment