Home › Forums › Backend Issues (wp-admin) › Backend shows information only of own user › Reply To: Backend shows information only of own user
Yes, this works for me. The cache made me crazy!
add_action( 'pre_get_posts', 'filtre');
function filtre($query) {
global $user_ID;
//global $current_user;
if( !is_admin() ) {
$query->set('author', $user_ID);
//$query->set('author',$current_user->id);
}
return $query;
}
Now I’m gonna try to filter the media, taxonomies and ACF. Will see if there’s a problems!
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.