meta_key not return results in get_posts
-
When calling the get_posts function, I’m look for all posts that have a CustomField named ‘ShowNav’ that has a value of ‘false’
I have confirmed that there are multiple published posts with this key/value combination, but both of the following function calls return an empty array.
$postlist = get_posts('meta_key=ShowNav'); $postlist = get_posts('meta_key=ShowNav&meta_value=false'); $args = array( 'meta_key' => 'ShowNav', 'meta_value' => 'false' ); $postlist = get_posts($args);
I’m actually using 2.9.2, but it wasn’t an option in the select
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘meta_key not return results in get_posts’ is closed to new replies.