Created
July 22, 2015 13:08
-
-
Save gicolek/f317d1457978bb0e20e9 to your computer and use it in GitHub Desktop.
ACF Recent Posts Query Filter
This file contains hidden or 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 | |
add_filter( 'acf_rwp_query', 'wp_doin_custom_query' ); | |
/** | |
* @hook acf_rwp_query | |
*/ | |
function wp_doin_custom_query($query) { | |
// say we want to limit the query to only single author | |
$query['author'] = 1; | |
return $query; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment