如何将repeater字段用于meta\\u查询我有一个只包含一些文本值的repeater字段,并且有一个表单,可以将变量发送到一个页面,在那里我获取值并存储一个值,该值是meta\\u查询中的值,我想获取在repeater字段中具有特定字符串的所有CPT,例如:
if(isset($_GET[\'tecnology\'])){
$tech = $_GET[\'tecnology\'];
echo $tech;
}
if(isset($_GET[\'category\'])){
$cat = $_GET[\'category\'];
echo $cat;
}
if(isset($_GET[\'start\'])){
$star_point = $_GET[\'start\'];
echo $star_point;
}
$args = array(
\'post_type\' => \'project\',
\'posts_per_page\' => -1,
\'orderby\' => \'post_date\',
\'meta_query\' => array(
array(
\'key\' => \'tecnologies\',
\'value\' => $tech,
\'compare\' => \'LIKE\'
),
array(
\'key\' => \'category_project\',
\'value\' => $cat,
\'compare\' => \'LIKE\'
),
array(
\'key\' => \'route\', //this is the repeater field
\'value\' => $star_point, // this is the string I want to know if it´s in the repeater field
\'compare\' => \'LIKE\'
)
)
);
$loop_servicios = new WP_Query( $args );
?>