Search With Multiple Custom Field
-
Hello , sorry if my question is rookie question ,
i have query search like this :
$args[‘recipes_skill’] = $_POST[“skill_recipes”];
$args[‘post_type’] = ‘recipes’;
$args[‘taxonomy’] = ‘category’;
$args[‘taxonomy_term’] = $thisCat->name;$results = $Q->get_posts($args);
With my code above i get data what i want
$args[‘recipes_speed’] = $_POST[“speed_recipes”];
$args[‘post_type’] = ‘recipes’;
$args[‘taxonomy’] = ‘category’;
$args[‘taxonomy_term’] = $thisCat->name;With my code above i get data what i want… But if i merge custom field recipes_speed & recipes_skill like this :
$args[‘recipes_skill’] = $_POST[“skill_recipes”];
$args[‘recipes_speed’] = $_POST[“speed_recipes”];
$args[‘post_type’] = ‘recipes’;
$args[‘taxonomy’] = ‘category’;
$args[‘taxonomy_term’] = $thisCat->name;i got 0 data and that is results not i want..
Any suggestion with my problem ? why when i’m combine 2 custom field i dont get data what i want 🙂
Thanks Very Much 🙂
The topic ‘Search With Multiple Custom Field’ is closed to new replies.