Meta_query to compare two key values
-
I need to only display a post, only if the key “total” is smaller then the key “target”.
So I need to get the value of two keys and compare them.$blog_args = array( 'post_type' => 'post', 'post_status' => 'publish', 'order' => 'DESC', 'orderby' => 'date', 'posts_per_page' => -1, 'meta_query' => array( array( 'key' => 'total', 'value' => 'target', 'compare' => '<', 'type' => 'NUMERIC' ), ), );
Do you know how to realize?
Thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Meta_query to compare two key values’ is closed to new replies.