Created
August 19, 2015 13:00
-
-
Save craigsimps/7f9e0d4d4549441de9cc to your computer and use it in GitHub Desktop.
Return an array of ACF fields.
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 | |
function get_acf_meta( $post_id, array $meta_keys ) { | |
foreach ( $meta_keys as $meta_key ) { | |
$fields[$meta_key] = get_post_meta( $post_id, $meta_key, true ); | |
} | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment