Thanks John, but i really don’t understand what i have to do. I’m not familiar with SQL query
All my others custom field users work perfectly, this is just with the repeater the problem, did i have to change all the query ?
i really don’t understand the pre_user_query and the impact on my all code :/
can you explain little bit more please ?
Hi
The method is already working ?
i tried.. and it dont work :/
What i made :
i got a custom field form, who search in ajax with get_users and with complexe request on many user’s customs fields
all work fine, even filter taxonomy assigned to user like custom field
but this dont work for my repeater field..
the repeater key is : liste_des_langues & the item key : langue
if add this :
function wpza_replace_repeater_field( $where ) {
$where = str_replace( "meta_key = 'liste_des_langues_$", "meta_key LIKE 'liste_des_langues_%", $where );
return $where;
}
add_filter( 'posts_where', 'wpza_replace_repeater_field' );
and this is my request args for this field :
if($langues && $langues != 'all'){
$temp = array(
'key' => 'liste_des_langues_$_langue',
'value' => $langues,
'compare' => 'LIKE',
);
array_push($request['meta_query'] , $temp);
}
this is the basic request :
$request = array(
'role__in' => array( 'consultant' ),
'meta_query' => array(),
'tax_query' => array(),
);
if(count($_GET) > 1){
$request['meta_query']['relation'] = 'AND';
}
and i dont understand where is my mistake, someone can help please ?
yes thanks James, i found another way working ! thanks for help 🙂
i found my problem, it was because i restrict admin area to my agency role with this :
function restrict_access_administration(){
if ( current_user_can(‘agency’) ) {
wp_redirect( get_bloginfo(‘url’) );
exit();
}
}
how can i restrict admin area without disturb front upload media please ?
i tested to deleted my custom roles, and create it again by clone editor roles.. nothing work, only if i put my user agency in admin role..
This is resolve.. it was because of a fu*$*$* other plugin.. front end editor.
Sorry for unless post
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.