Custom Post Order Query Loop / Metabox

Yeah, I do agree that Patrick’s case is justified that’s why I wrote “unless you use this field somewhere else and it must be displayed as “01”.” :upside_down_face:

Back to your settings, if I were you I’d share:

  1. Bricks version together with plugins used for what you’re trying to achive
  2. Where is the query used (on page, post, CPT, archive, etc.)
  3. If the field is part of a simple group of fields, repeater or flexible content.
  4. Field settings (type, name, important settings like output format if applies etc.)
  5. Elements structure in the builder
  6. Settings of the query loop in the left pane while stretching it so everything is clearly visible there

Generally speaking it’s always better to add too much information on your setup than too little.

I’d like to stress again that I use ACF and never used MB, so this could be a bug with Metabox in Bricks. As far as I can tell @Patric uses ACF as well.

Going step by step with my setup

Bricks: 1.7.3 (current stable)
ACF: 6.2 (current stable, free)

I use a simple group of fields attached to a CPT named “Referencje” (basicaly testimonials). The field used for ordering is of “Number” type, field name is “testimonial_order”. Other settings tabs like validation shouldn’t matter.

Then on a new page I create a brand new structure using only bricks native elements. Please remember that we set query loop on the element that is meant to be multiplied not on the container (like in Oxygen builder). You can see it as an infinity sign right from Block element in the structure.


Everything comes “as is” with default settings. The only change I made was to add dynamic field “testimonial_order” as content of the Basic Text. This is done by placeing {acf_testimonial_order} when using ACF, but should be {mb_testimonial_order} if I used Metabox.

This should be changed depending on the source of this dynamic data. Please refer to: Dynamic Data – Bricks Academy. Be especially careful when using repeaters and flexible content or other non-basic setups of fields.


The query loop set on the Block element looks like this. Important not is to use “testimonial_order” as Order meta key and not “acf_testimonial_order”

Which gives this output on frontend (also visible in the editor)


This is the DOM structure produced (ommiting stuff before and after <main></main> like header and footer).


This should give you a CPT query ordered by ACF Number field.

@lynxm reading your post again it seems that you not only set the “order by” but also “meta query” down below in settings. So could you show a screenshots of:

  1. Structure panel
  2. All query settings (can be 2+ separate screenshots) that shows element name (like Block) on top together with “order by” and meta query below. Perfect if you could stretch the panel a bit so everything can be read in full.

It seems that people report some problems with using Metabox fields in Bricks, like here.

1 Like