Comments Sherry started the conversationJune 12, 2019 at 1:32pmHi there,this is a temporary domain.I installed Ivory search plugin, and tried many kinds of trouble shooting, never succeed to search the portfolio article.May I know is there any suitable search plugin for New Wave theme.appreciate the help, thanks 1,973Support repliedJune 13, 2019 at 6:55amHello Sherry,We have not tested or integrated the theme with any of the search plugins but try opening functions.php file and remove this bit:if( !function_exists('searchfilter') ){ function searchfilter($query) { if ($query->is_search && !is_admin() ) { $query->set('post_type',array('post')); } return $query; } add_filter('pre_get_posts','searchfilter'); }Thank you. Clapat Support https://www.clapat.com/ Review Envato Item Support PolicySherry repliedJune 16, 2019 at 1:18pmHiThanks for the suggestion, though it's still not working?thus I'm wondering if the search function was only for blog article? and there's no "not found page" I do need the search function working for portfolio post, wanna know if there's any solution. thank you 1,973Support repliedJune 17, 2019 at 2:40pmHi Sherrytry this solutionhttps://wp-snippet.com/snippets/include-specific-custom-post-types-wordpress-search-results/following this suggestion your code would look likeif( !function_exists('searchfilter') ){ function searchfilter($query) { if ($query->is_search && !is_admin() ) { $query->set('post_type',array('post', 'newave_portfolio')); } return $query; } add_filter('pre_get_posts','searchfilter'); }just replace the old code from functions.phpThank you. Clapat Support https://www.clapat.com/ Review Envato Item Support Policy Sign in to reply ...
Hi there,
this is a temporary domain.
I installed Ivory search plugin, and tried many kinds of trouble shooting, never succeed to search the portfolio article.
May I know is there any suitable search plugin for New Wave theme.
appreciate the help, thanks
Hello Sherry,
We have not tested or integrated the theme with any of the search plugins but try opening functions.php file and remove this bit:
if( !function_exists('searchfilter') ){
function searchfilter($query) {
if ($query->is_search && !is_admin() ) {
$query->set('post_type',array('post'));
}
return $query;
}
add_filter('pre_get_posts','searchfilter');
}
Thank you.
Clapat Support
https://www.clapat.com/
Review Envato Item Support Policy
Hi
Thanks for the suggestion, though it's still not working?
thus I'm wondering if the search function was only for blog article?
and there's no "not found page"
I do need the search function working for portfolio post, wanna know if there's any solution. thank you
Hi Sherry
try this solution
https://wp-snippet.com/snippets/include-specific-custom-post-types-wordpress-search-results/
following this suggestion your code would look like
if( !function_exists('searchfilter') ){
function searchfilter($query) {
if ($query->is_search && !is_admin() ) {
$query->set('post_type',array('post', 'newave_portfolio'));
}
return $query;
}
add_filter('pre_get_posts','searchfilter');
}
just replace the old code from functions.php
Thank you.
Clapat Support
https://www.clapat.com/
Review Envato Item Support Policy