The final field is PASSWORD, as I mark in the image
This is the code of how I tried to get the field..
ACF structure:
repeater_machines
=> country
repeater_password
=> password
add_filter('posts_where', 'yanco_posts_where');
function yanco_posts_where( $where ) {
$where = str_replace( "meta_key = 'repeater_machines_password_repeater_$", "meta_key LIKE 'repeater_machines_%_password_repeater_%", $where );
return $where;
}
if(isset($_GET['password'])) {
$password = sanitize_text_field( $_GET['password'] );
$meta_query[] = array(
// 'key' => 'repeater_machines_$_password', // Format: repeater_field + _ + $ + _ + repeater_sub_field password_repeater
'key' => 'repeater_machines_$_country_password_repeater_$_password',
'value' => $password,
'compare' => '='
);
}
'repeater_machines_$_country_repeater_password_$_password'
$where = str_replace( "meta_key = 'repeater_machines_$_country_repeater_password_$", "meta_key LIKE 'repeater_machines_%_country_repeater_password_%", $where );
I tried to do like you write, but when I put this line
repeater_machines_$_country_repeater_password_$
It considers that this part of the code $_country_repeater_password_
is the variable
Undefined variable: _country_repeater_password_
Can you help me to handle with this issue ?