Last active
December 6, 2018 13:21
-
-
Save svenl77/15ccb2855abfd806f716a7e42880af00 to your computer and use it in GitHub Desktop.
You can use any query parameter from WP_Query: https://codex.wordpress.org/Class_Reference/WP_Query if you want to change the post per page you can also use this filter: buddyforms_user_posts_query_args_posts_per_page
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 | |
/* | |
* Manipulate the user posts list query | |
*/ | |
add_filter( 'buddyforms_user_posts_query_args', 'my_buddyforms_user_posts_query_args', 10, 1 ); | |
function my_buddyforms_user_posts_query_args( $query_args ){ | |
global $buddyforms; | |
$query_args['cat'] = '4'; | |
return $query_args; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment