Home › Forums › Backend Issues (wp-admin) › Field Groups not showing for custom role › Reply To: Field Groups not showing for custom role
Update,
i’ve narrowed it down to the fact that i’m using this code to stop anyone who is logged in as a role of school being able to see anyone elses posts.
function posts_for_current_author($query) {
global $user_level;
if($query->is_admin && $user_level < 5) {
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');
If i remove that, the custom fields show fine.
Any idea how to modify that code so it doesnt interfere with ACF?
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.