WP: Meta_query to compare two key values


#1

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


#2

Anyone?
I would need that really soon but can’t find an answer with google.


#3

Don’t thing it’s possible through meta key, world have to write your own SQL query