For now I have changed class-ysm-search.php
protected static function get_suggestions($posts)
{
$sep_exclude = get_option( 'sep_exclude', array() );
foreach ($posts as $post) {
if(in_array($post->ID,$sep_exclude)){
continue;
}
....
....
-
This reply was modified 8 years, 8 months ago by
darkallman.
Hi @darkallman,
Another possible solution is adding following snippet to the functions.php file:
function smart_search_query_where_filter( $where ) {
$sep_exclude = implode(',', get_option( 'sep_exclude', array() ));
$condition = sprintf('p.ID NOT IN (%s)', $sep_exclude);
$where['and'][] = $condition;
return $where;
}
add_filter( 'smart_search_query_where', 'smart_search_query_where_filter' );
Thanks for this update. Implemented it now.
Is there a similar way to do this for groups hidden products?