Home › Forums › Backend Issues (wp-admin) › Attachment Meta Box Disappears › Reply To: Attachment Meta Box Disappears
Got the very same problem with 4.3.8, but only for other user roles than administrators. I use the following code to achieve that the users can only edit their own posts:
add_action('pre_get_posts', 'query_set_only_author' );
function query_set_only_author( $wp_query ) {
$screen = get_current_screen();
if ($screen->base === 'post')
return $query; // From ACF Support Forum
global $current_user;
if( is_admin() && !current_user_can('edit_others_veranstaltungen') ) {
$wp_query->set( 'author', $current_user->ID );
add_filter('views_edit-veranstaltung', 'fix_veranstaltungen_counts');
}
}
Any ideas to fix that problem? I searched the ACF js but it didn’t help me.
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.