How do I order a query loop by metabox field

I’m new to Bricks, and loving it except for this one problem: I can’t order query loops by date field, or any MetaBox field for that matter.

I’m trying to organize a set of books by publication date, and I have a MetaBox custom field date picker for that. I can display the custom date on the frontend without trouble, so the field is working and recording data. But when I set Order By to ‘Meta Value’ and give it the ID as key, it finds no posts. I’ve tried setting it to Meta Value Numeric with no change, even if I set the field to record as a number rather than a date.

Trying other fields, even plain numbers or letters, doesn’t work either.

What am I doing wrong?

Did you use the ID set in Metabox field?
image
image

Yep, that’s the ID I used. I’ve tried it prepended by the database, the way the dynamic data displays it, as well, and neither worked.

Can you perhaps make a screenshot of your query and maybe your structurepane? Might help to see if something is different. At my end it works perfectly.

Okay, here’s the query:
Query

I’ve tried using mb_book_novel_publication_date as well, as that’s what dynamic data calls the field (and that displays just fine), but the result is no different

Thanks for your time and effort with this! I’ll put the structure in another post, since I’m new and can’t post more than one at a time.

Structure

And here’s the custom field itself, in case that’s where I’ve messed up:
Custom Field

Are you by chance using the Meta Box Custom Table extension? I am using that on my particular custom fields which is not working as well when trying to order so I’m not sure if that is related as well.

1 Like

Yes, I am! I’ll see if not using a custom table helps, thanks for the hint.

It works :slight_smile: Thank you again, that seems to fix my issue!

You guys don’t forget to report this bug to Metabox team. I have also reported few bugs related to custom table but they are yet to be fixed by the team. They do not prioritize custom table addon unfortunately.

2 Likes