I'm banging my head to the wall all day trying to figure this out.
I have two meta keys a1 and a2 with numbers inside.
I'm trying to show posts that are a2 > a1.
In a nutshell, here's what I'm trying to accomplish:
$posts = get_posts(array( 'post_type' => 'post', 'meta_query' => array( //return both meta keys array( 'key' => 'a1', ), array( 'key' => 'a2', ), //only show posts that a2 meta_value is greater than a1 meta_value 'a2' > 'a1' ), ));
I know it should be possible to do this somehow.
I'm not the only one in the world trying to compare whether one post's meta_key value is greater than other...
Desperately need help or any kind of solution.