- This topic has 2 replies, 2 voices, and was last updated 1 year, 1 month ago by .
reference: meta_query with MB Custom Tables
I need to loop (ordered and field-selected) through a custom database with Oxygen page builder.
So there is no other way as to use a meta_query!
You are offering "MB Custom Table" but as far as I understood no way to order such a table with meta_query.
The referenced post is dated Feb 2018.
Your comment was:
"I’m not sure about this, because the way WordPress build SQL queries from meta query object is very complicated. I’ll see if I can do something."
Was there any change within the roughly 2 years?
If no implementation was possible: Is there any workaround on how to implement the first SQL request in a meta_query?
$args = array( 'post_type' => 'square', 'meta_key' => 'sq_text_order', // not meta-value-num, as it is a text field 'orderby' => 'meta_value', 'order' => 'ASC', 'meta_query' => array( array( 'key' => 'sq_select_squarematrix', 'value' => 'Home', 'compare' => '=' ) ) ) );
- You must be logged in to reply to this topic.