Support » Fixing WordPress » Multiple meta_value in get_posts

  • I’m using get_posts to create a new loop. I’d like the loop to pull pages that have two different custom field values (but the same custom field key) – is it possible to do that? I’ve tried comma and space separating the values to no avail. Here’s my code:

    $postslist = get_posts('post_type=page&meta_key=status_type&<strong>meta_value</strong>=incident&exclude=2&post_parent=0');
    					    foreach ($postslist as $post) :
    					    $customPostID = get_post_custom($post->ID);

  • The topic ‘Multiple meta_value in get_posts’ is closed to new replies.