Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Last active May 17, 2024 09:48
Show Gist options
  • Save propertyhive/0eb926db400fc5d348813853a3817cb7 to your computer and use it in GitHub Desktop.
Save propertyhive/0eb926db400fc5d348813853a3817cb7 to your computer and use it in GitHub Desktop.
add_action( 'elementor/query/onmarketauctionpropertyquery', 'elementor_query_on_market_auction_only' );
function elementor_query_on_market_auction_only( $query )
{
$_GET['department'] = 'auction';
$_REQUEST['department'] = 'auction';
PH()->query->property_query( $query );
// Set the custom post type
$query->set( 'post_type', [ 'property' ] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment