I really don’t know what’s the issue. I think my code is OK but the output is wrong. I don’t know anything about WordPress, please help me.
elseif ($_GET['search']) {
$args = array(
'post_type' => 'head_to_toe_videos',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'post_title',
'value' => $_GET['search'],
'compare' => 'LIKE',
)
),
'posts_per_page' => 12,
);
}
2
Answers
Your query is correct but need to execute you query like this:
Try the below code your problem will solve.