Hi there, thanks for this tutorial. I implemented and it works fine. I’m just curious how can I add the product’s SKU and Price to be shown for each product as well? At the moment it just shows the image and title. Thanks، you are right. Because I didn't know how to add more code to it, I asked you. This is very important for Woo websites. 🙏🙏🙏
Hi Nima. Yes, this is possible, but it requires changes in the code. In the future I will make a dedicated video about the search bar for WooCommerce products and I will include all the requests in it.
@@WPCookie Not worked. Can you please watch the video below what i mean? On my website when i click on select button appear popup modal view. But if i click on your code for an search result it redirect to product page. It's not open as popup modal view. th-cam.com/video/vfze95amYXU/w-d-xo.html
Hi. sorry i asked a lot of questions...When it is empty, clicking on the search bar redirects to the dashboard. How do I know, when clicked while it is empty, the search bar will be directed to the shop page or to the main page?thank you
Hello Ram, the search bar itself is not linked anywhere and clicking on the magnifier icon will take you to the default WordPress search page. If you mean the "Sorry, nothing found" link then find Sorry, nothing found and put your desired link instead of #.
Hi, if you don't want the search button, remove the button tag: 🔍 By default, the length of the search bar is 600px, if you want to expand it, delete the following style code: width: 600px!important;
@@WPCookie Thank you very much for your reply. How background of the search bar? Now the net is in color and where can I change the background color of the search bar? in the css section or html?I wish you a good day
hi. i hope everything is going well..i want to ask a question. ajax search looks good but doesn't show categories. so I would like it to search the categories. How do I add it to those codes and show the categories?
Hey there! I hope you’re doing well. If you’d like to see posts in one or more specific categories in your search results, it’s possible to make a few changes in the code. However, if you’d like the categories themselves to be displayed in your results, that’s a bit more complicated.
@@WPCookie sir my question is it shows products and posts in search. but it doesn't show categories. Let's say my post is one for animals and the other for humans. While I was doing ajax search, let's say I searched for an animal and the catalog should be displayed. All posts should be about animals when you enter that category.
Hi there, thanks for this tutorial.
I implemented and it works fine. I’m just curious how can I add the product’s SKU and Price to be shown for each product as well? At the moment it just shows the image and title.
Thanks، you are right. Because I didn't know how to add more code to it, I asked you. This is very important for Woo websites. 🙏🙏🙏
Hi Nima.
Yes, this is possible, but it requires changes in the code. In the future I will make a dedicated video about the search bar for WooCommerce products and I will include all the requests in it.
is it possible to respect exiting popup screen after click on search result?
Yes, use this code instead:
goonlinetools.com/snapshot/code/#tf6rfkjxbuntshopsj27
Please let me know if this code worked for you.
@@WPCookie Not worked. Can you please watch the video below what i mean? On my website when i click on select button appear popup modal view. But if i click on your code for an search result it redirect to product page. It's not open as popup modal view.
th-cam.com/video/vfze95amYXU/w-d-xo.html
Hi. sorry i asked a lot of questions...When it is empty, clicking on the search bar redirects to the dashboard. How do I know, when clicked while it is empty, the search bar will be directed to the shop page or to the main page?thank you
Hello Ram, the search bar itself is not linked anywhere and clicking on the magnifier icon will take you to the default WordPress search page.
If you mean the "Sorry, nothing found" link then find
Sorry, nothing found
and put your desired link instead of #.
you are a king. i want remove serach button. I don't know coding. how do i delete the button button and get the bar extended. Thank you
Hi, if you don't want the search button, remove the button tag:
🔍
By default, the length of the search bar is 600px, if you want to expand it, delete the following style code:
width: 600px!important;
@@WPCookie Thank you
@@WPCookie I want to ask a question. How can I make a price filter without a plugin?
@@ramaslan Go to Appearance-> Widgets and in the Woocommerce Sidebar add a "Filter Products by Price" block.
@@WPCookie Thank you very much for your reply. How background of the search bar? Now the net is in color and where can I change the background color of the search bar? in the css section or html?I wish you a good day
hi. i hope everything is going well..i want to ask a question. ajax search looks good but doesn't show categories. so I would like it to search the categories. How do I add it to those codes and show the categories?
Hey there! I hope you’re doing well. If you’d like to see posts in one or more specific categories in your search results, it’s possible to make a few changes in the code. However, if you’d like the categories themselves to be displayed in your results, that’s a bit more complicated.
@@WPCookie sir my question is it shows products and posts in search. but it doesn't show categories. Let's say my post is one for animals and the other for humans. While I was doing ajax search, let's say I searched for an animal and the catalog should be displayed. All posts should be about animals when you enter that category.
@@WPCookie these codes are working perfectly, it just doesn't show the categories.
@@WPCookie
$categories = get_the_terms($product_id, 'product_cat'); // استرداد قائمة بكل الفئات التي ينتمي إليها المنتج
Hi, what if I want to search user roles
Snippet automatically deactivated due to an error on line 6:
Cannot redeclare function asearch_func.
You probably already inserted this code into code snippets plugin, you should delete the previous one.