Multiple meta_value in get_posts (1 post)

  1. chizet
    Posted 6 years ago #

    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);

Topic Closed

This topic has been closed to new replies.

About this Topic