Menyembunyikan ‘Page’ dari Search Results

function remove_pages_from_search($query) {
if ($query->is_search) {
$query->set(‘post_type’, ‘post’);
}
return $query;
}
add_filter(‘pre_get_posts’,’remove_pages_from_search’);