/* Add new query type controls to query options */
add_filter('bricks/setup/control_options', 'rgt_add_new_query_type_controls');
function rgt_add_new_query_type_controls($control_options)
{
/* Adding new options in the dropdown */
$control_options['queryTypes']['mls_image_custom_query'] = esc_html__('MLS Images');
return $control_options;
};
This works fine, but now I need to extend the query to include custom options like Offset and Posts Per Page. How can I add option fields to the query in the builder?
Just had a look at the query editor, looks very useful. In my case my custom query loop is actually not a WP Query so wouldn’t have worked, but good to know its there for future use
I need the same functionality since I am building a custom query loop from a json object. The provided solution above does not seems like a native solution since the inputs are not added to the query loop dialog itself, but the content tab.
It will be good if this functionality is provided in a better and easy way.