Home › Forums › Backend Issues (wp-admin) › Groups not showing for non-admin users › Reply To: Groups not showing for non-admin users
Hi, run in the same problem with an AIT Theme (Eventguide),
First im new to wordpress but i found out that there is a problem with a filter.
My custom usergroups can not see the customfields the problem is in this:
function altered_search($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);
}
add_filter('pre_get_posts', 'altered_search');
When i comment the add_filter out the custom fields display but the user can also edit other post types.
Does anyone have a solution or a hint for this?
PS: The support from ait answer:
Hello, seems like the filter which is needed to filter posts and show only posts created by currently logged in user may cause the problem, it’s part:
if(isCityguideUser($wp_user->roles)){
$query->set(‘author’, $wp_user->data->ID);
}
Unfortunately it’s important part for theme core functionality and users registered via our theme. I am sorry but we are not capable to customize theme scripts per customers needs to make working all third party plugins. Seems like this filter needs some workaround in order to work with other parts like custom fields from plugin.
Thanks for understanding, Ivan.
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.