Last active
March 24, 2020 15:57
-
-
Save vanaf1979/3318b4b258bc92270f4b4e30249df018 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' => 'MacOS', | |
'compare' => '=' | |
) | |
) | |
); | |
$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