Support

Account

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.