Home › Forums › General Issues › Post Object Query By Author › Reply To: Post Object Query By Author
I was wondering,
you can set the filter applies only to users and not admins or moderators?
I tried to use this code to differentiate between users and admin, but it is as if nothing is filtering.
if ( ! is_admin() ) {
// modify the order
$current_user = wp_get_current_user();
$user_id = $current_user->ID;
$args['author']=$user_id;
$args['authors']=$user_id;
$args['post_type']='stand';
return $args;
}
else { $args['post_type']='stand'; return $args; }
There is solution?
Thanks
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.