Skip to content

Instantly share code, notes, and snippets.

@LaxusCroco
Created November 16, 2023 12:20
Show Gist options
  • Save LaxusCroco/866f02c1e5b7f40207288633481441af to your computer and use it in GitHub Desktop.
Save LaxusCroco/866f02c1e5b7f40207288633481441af to your computer and use it in GitHub Desktop.
<?php
function getQueryResult($query_id = 1){
if(function_exists('jet_engine')){
$query = Jet_Engine\Query_Builder\Manager::instance()->get_query_by_id( $query_id );
return $query ? ',' . jet_engine()->listings->macros->do_macros('%query_results|' . $query_id . '|ids%') . ',' : '';
}
return '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment