Home › Forums › Backend Issues (wp-admin) › ACF is not showing in other user dashboard in posts or pages › Reply To: ACF is not showing in other user dashboard in posts or pages
I did it but it still not working.
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'get-items:retrieve') {
return $query;
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'loadSpecialMenu') {
$query = apply_filters( 'ait_alter_ajax_query', $query );
return $query;
}
/* Display posts in admin for current user only */
$wp_user = wp_get_current_user();
if(isCityguideUser($wp_user->roles)){
$query->set('author', $wp_user->data->ID);
}
If I comment this line($query->set(‘author’, $wp_user->data->ID)) then field were showing. But issue is item list of other users also visible in current user dashboard.
Kindly this screenshot(https://prnt.sc/lil3x5), if no item is added by user, other users items were showing.
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.