When your website means business.

WP Query, WP/CP | Type: PHPWordPress Meta Query (Basic Example)

Meta Queries compare multiple keys and values.

$args = array(
    'meta_query' => array(
        array(
            'key' => 'key1',
            'value' => 'value1',
            'compare' => '='
        ),
        array(
            'key' => 'key1',
            'value' => 'value2',
            'compare' => '='
        )
    )
);
$query = new WP_Query( $args );

Reference Links

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept