Replies: 3 comments 2 replies
-
Hi, this is impossible to check without having a link to your project. However, are you sure that you are using the Woo product-searchform widget? About your snippet, you do not need to add something to the default WP searchform because it searches products as well. Check here: https://bootscore.me/blog/
Your bug has nothing to do with the theme, it seems that there is a misconfiguration in settings or a snippet somewhere in your page that hides search results. But you can try to activate a default WP theme like Twenty Twenty-Two and check search results again. If still no search results shown, then it is something in the settings. If results shown, then we can investigate further. But for sure, it has nothing to do with the theme, because we did nothing there. Hope that helps |
Beta Was this translation helpful? Give feedback.
-
Hello ... thank you for responding. I installed the twenty twenty-two theme, and search product isn't working there either. I should have done this to begin with...sorry about that... it's the only thing I hadn't checked. But yes, I am using the product search form widget. There aren't any settings in woocommerce specifically related to the search. I've spent days in google and going through thread after thread to no avail. If there were even an error in the logs, it would at least be something to start with.... I'm at a complete loss. Sorry to have bothered you. If anything comes to mind, I sure would appreciate your feedback. Thank you again. |
Beta Was this translation helpful? Give feedback.
-
Hello, the regular wordpress search works...I tried that in the very beginning. It searches pages just fine. I did go through the url you provided, and although my products are showing with no problem, I did a few things mentioned in that blog, but it didn't help. Wow...I'm truly stumped. Thank you for trying to help me. Not sure what to do from here. Definitely can't bring a customers site live without the search working. lol |
Beta Was this translation helpful? Give feedback.
-
Hello,
wp version: 6.1.1
woocommerce version: 7.4.1
bootscore version: 5.2.3.2
The theme I use is the bootcommerce, however, the product search does not work...always displays nothing found. So I changed my theme to the bootscore main, disabled all plugins except for woocommerce, and tried search again, and again the result is nothing found.
All product is set to Catalog visibility: Shop and search results
If I go to Woocommerce > Status > Regenerate the product attributes lookup table - and search for a product from there, it shows up
I even regenerated that table
I also added the following to my themes function.php file to be sure wordpress search includes product:
function tg_include_custom_post_types_in_search_results( $query ) {
if ( $query->is_main_query() && $query->is_search() && ! is_admin() ) {
$query->set( 'post_type', array( 'product' ) );
}
}
add_action( 'pre_get_posts', 'tg_include_custom_post_types_in_search_results' );
I'm not sure what else to provide here. I'd rather not post the url to the site publicly but happy to email it to you.
Any ideas where I can perhaps further troubleshoot this issue?
Thank you for any help.
Beta Was this translation helpful? Give feedback.
All reactions