Last active
March 24, 2020 15:57
-
-
Save vanaf1979/5000096b18139fcbaf7f6406fe4e9620 to your computer and use it in GitHub Desktop.
Snippet #010 Filter posts by (Acf) Meta values https://since1979.dev/snippet-010-filter-posts-by-acf-meta-values/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'post', | |
'meta_query' => array( | |
array( | |
'key' => 'os', | |
'value' => array('MacOs','Linux'), | |
'compare' => 'IN' | |
) | |
) | |
); | |
$macos_posts = get_posts($args); | |
print_r($macos_posts); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment