Post title: "Test"
when i am searching "test" then autosuggestion not showing result but when search First word Capital "Test" then autosuggestion showing.
How to solve it?
Please response Thank You
$results = new WP_Query( array(
'post_type' => array( 'dream'),
'post_status' => 'publish',
'posts_per_page'=> 221,
's' => stripslashes($_POST['search'])
//'s' => $search_key,
//'title' => 'true',
));
$items = array();
if ($results->have_posts()) {
while ( $results->have_posts() ) : $results->the_post();
$items[] = get_the_title();
endwhile;
}
source https://stackoverflow.com/questions/76789797/custom-post-type-search-only-title-wp-query-and-title-capital-and-small-latter-i
No comments:
Post a Comment