Home › Forums › Backend Issues (wp-admin) › Not compatible with this code? › Reply To: Not compatible with this code?
Woops – I checked the “this solved it”-button, but I’m still struggling with it.
I’m not much of a coder, but I tried various ways of coding and thus far without luck.
Right now I’ve changed it to
function posts_for_current_author($query) {
global $user_level;
if($query->is_admin && $user_level < 5 && get_post_type() != "acf") {
global $user_ID;
$query->set('author', $user_ID);
unset($user_ID);
}
unset($user_level);
return $query;
}
add_filter('pre_get_posts', 'posts_for_current_author');
But unfortunately that doesn’t change a thing.. Any thoughts?
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.