Using WP_query to get posts based on meta box values
-
I am using WP_query to get posts — and I want to be able to get posts which have specific meta-box values. I am using a meta-query array, however it doesn’t seem to be working:
$portfolio_args['meta-query'] = array( array( 'key' => 'my_keyname', 'value' => 'my_value' ) );
Is this the correct way to get posts with a specific metabox value?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Using WP_query to get posts based on meta box values’ is closed to new replies.