I have added a line in my x child theme function.php file to make it search for product. It seems to return products when part number is entered without fail. What do I add to make it search description text? Addition added last week is listed below. I was thinking it would just be a line of code to the piece below.
Please advise. Thank you.
add_filter( ‘pre_get_posts’, ‘custom_search’ );
function custom_search( $query ) {
if ( $query->is_search ) {
$query->set( ‘post_type’, array( ‘product’ ) );
}
return $query;
}