Query Builder - Meta Queries / Sort By Custom Fields
complete
Louis Reingold
complete
We added support for meta queries in Breakdance 1.3.
We also added support for sorting by ACF / Metabox fields in Breakdance 1.3.
Thanks all for voting!
If anyone has further feature requests related to the query builder, please open a new issue with specifics.
B
Bob
+1000000
Louis Reingold
"advanced" is extremely vague.
Can you please mention what specific options you want?
J
Jack Dufin
Louis Reingold: Hi Louis, Features like Repeater Field; Render data or filter data by meta key/Taxonomy/tags/custom key etc;
Louis Reingold
We have a Post Loop Builder right now.
And you can already render meta key, taxonomy, tags, etc. in Breakdance: https://breakdance.com/features/dynamic-data/
Please clarify.
Louis Reingold
Unless I'm mistaken, you can already do queries based on taxonomy and tags too.
What EXACTLY are you asking for? Meta queries?
J
Jack Dufin
Louis Reingold: If I have repeater field in a post, can I use repeater field meta key to render data?
Jeffrey van der Vet
Louis Reingold: more advanced so you can use and filter by WordPress (meta) queries.
Raul Estrela
Louis Reingold:
Jeffrey van der Vet
Raul Estrela: And if I am correct you can only do AND conditions not OR
Raul Estrela
Jeffrey van der Vet: yes that's correct.
I think Louis Reingold wants to keep Breakdance simple to use and for more experienced users he enabled the option to edit the query in the text mode and array mode. With that, the possibilities are endless.
But I think he could insert somewhere, near the query builder, a link to one help page to show some examples of what you can do with that.
I open a support ticket with them and they give me some samples and good links to start with. And that helps me a lot (https://developer.wordpress.org/reference/classes/wp_query/ for example).
Look at this example where I create a query (on the array tab) to list all posts and pages, that have a specific custom field ("campo_personalizado") order by that field value and not list the current post:
return ['post_type' => array( 'post', 'page' ) , 'meta_key' => 'campo_personalizado' , 'meta_compare' => 'EXISTS' ,'orderby' => 'meta_value' , 'order'=>'ASC' ,'post__not_in' => [get_the_ID()]];
I hope this helps you, and others searching for more advanced queries.
J
Jack Dufin
Louis Reingold: I encountered a nested loop builder issue, like I have a post loop builder in a global block and then use the global block in a new post loop builder, there is lack of ability to customise both loops seperately. Elijah was checked this issue and he submitted to Github as well. https://github.com/soflyy/breakdance-bugs/issues/407
B
Bob
Raul Estrela: I need this one too!!!!!!!!!! I need to show/hide posts based on custom fields / custom post meta. Louis Reingold, a simple text field where I can add the name of the post meta field and test for a value would be enough!!