The Advanced Query builder present in Oxygen Builder repeaters is a powerful way to display all types of posts, filtering down to exactly what you want. Additionally, there's an added bonus of being able to insert dynamic data from ACF fields, WordPress core, and any PHP function, to really create some powerful queries using a simple GUI.
However, there are 2 main problems with this feature - 1, many don't know how to structure the query they want (they're complicated to begin with!), and 2, once we have the query, it can be tedious to add all of the fields, data, and info to the GUI.
In the past, we've seen many building queries using our WordPress PHP mode, and translating them to Oxygen.
Now, with the Oxygen Builder Advanced Query Mode by CodeWP, you can generate entire Advanced Query repeaters from a single sentence, ready to be imported directly into your project and used in seconds!
All you need to do is prompt for what query you want - ex, "Get all posts by the current author, tagged 'Good Work' ". CodeWP's AI will convert this into a WP_query, and then build out the JSON for a repeater element, ready to be installed on the site.
This will generate a self contained reusable part for Oxygen Builder, in JSON format. To import it, first, create a new reusable part.
Then, under the Oxygen Meta Box, click on JSON, and paste the generation directly into the input.
Publish your reusable part, then open it in Oxygen. Review the Advanced Query to check the formatting and review the logic.
Then, you can add the part to any page you need, using either single or edit mode, depending on your needs.
{"id":0,"name":"root","depth":0,"children":[{"id":1,"name":"oxy_dynamic_list","options":{"ct_id":1,"ct_parent":0,"selector":"codewp_advanced_query","original":{"image_type":"2","attachment_size":"full","wp_query":"advanced","wp_query_advanced_preset":"Custom Settings","wp_query_advanced":[{"key":"post_type","values":[{"value":"post"}]},{"key":"meta_key","values":[{"value":"product_price"}]},{"key":"meta_value","values":[{"value":"100"}]},{"key":"tax_query","values":[{"value":"","key":"array","values":[{"value":"brand","key":"taxonomy","values":[]},{"value":"slug","key":"field","values":[]},{"value":"","key":"terms","values":[{"value":"nike"}]}]}]},{"key":"orderby","values":[{"value":"title"}]},{"key":"order","values":[{"value":"ASC"}]}]},"nicename":"CodeWP Advanced Query","ct_depth":1},"children":[{"id":2,"name":"ct_div_block","options":{"ct_id":2,"ct_parent":1,"selector":"codewp_advanced_query-inner","nicename":"CodeWP Advanced Query - Inner","ct_depth":2,"ct_content":"","original":[]},"depth":"2"}],"depth":1}],"meta_keys":[]}
{"id":0,"name":"root","depth":0,"children":[{"id":2,"name":"oxy_dynamic_list","options":{"ct_id":2,"ct_parent":0,"selector":"codewp_advanced_query","original":{"image_type":"2","attachment_size":"full","wp_query":"advanced","wp_query_advanced_preset":"Custom Settings","wp_query_advanced":[{"key":"post_type","values":[{"value":"post"}]},{"key":"author","values":[{"value":"[oxygen data='phpfunction' function='get_current_user_id' ]"}]},{"key":"meta_key","values":[{"value":"featured"}]},{"key":"meta_value","values":[{"value":"1"}]},{"key":"date_query","values":[{"value":"","key":"after","values":[{"value":"July","key":"month","values":[]},{"value":"1st","key":"day","values":[]},{"value":"2020","key":"year","values":[]}]},{"value":"","key":"before","values":[{"value":"July","key":"month","values":[]},{"value":"1st","key":"day","values":[]},{"value":"2021","key":"year","values":[]}]},{"value":"true","key":"inclusive","values":[]}]}]},"nicename":"CodeWP Advanced Query","activeselector":false},"depth":1,"children":[{"id":3,"name":"ct_div_block","options":{"ct_id":3,"ct_parent":2,"selector":"codewp_advanced_query-inner","original":[],"nicename":"CodeWP Advanced Query - Inner","activeselector":false},"depth":2}]}],"meta_keys":["oxygen_lock_post_edit_mode"]}