Elementor LOOP Tutorial: Create a Custom Product Search Result Page With Loop Grid
HTML-код
- Опубликовано: 11 сен 2024
- In this Tutorials, you will learn how to make use of the Elementor theme Builder to Create a Custom Product Search Result Page With Loop Grid.
If you have a Beautiful Loop grid Design for your product and want it to display also in search results with this tutorial you will be able to do that with stress.
Tutorials Mentioned:
Elementor LOOP Tutorial: How to DISPLAY a Different PRODUCT Image on HOVER | No Code Required • Elementor LOOP Tutoria...
Elementor Tutorial: How To Style Numbered Pagination For Loop Grid (Posts and Products Widgets) • Elementor Tutorial: Ho...
#elementor #wordpresstutorial
Copy and paste this code
// products search results display
add_filter('pre_get_posts','lw_search_filter_pages');
function lw_search_filter_pages($query) {
if ( ! is_admin() && $query->is_search() ) {
$query->set('post_type', 'product');
$query->set( 'wc_query', 'product_query' );
}
return $query;
}
OMG you've helped me so much !!! Thank you !!!
I'm trying to recreate this functionality using regular post (not woo commerce) and have different pages that should search for posts within a specific category (e.g. PageA shows CategoryA posts and allows users to search for posts within CategoryA). I've gone through all of your steps, and tried customizing the snippet to account for these differences but am still unable to filter the search results to the relevant category (e.g. searching on PageA yields search results from CategoryA, CategoryB, etc.). Do you know how I would edit the snippet to adjust for this?
Great tutuorial dude! It was clear and concise. Bravo!
Thanks for this wonderful tutorial 🎉❤
Tanks for good videos. I have a fibo search bar (from plugin) in my shop, and it dont work with that. Can you help?
i dont know much about FiboSearch and the settings but from what read about it is its an Ajax Search plugin for woocommerce so i dont think it wont work but try to check the settings properly you might find a way arround
Thank you for this
it helps alot buddy ... thanku
I dont use Woocommerce, and i dont have products archive template inside theme builder. But problem is same. I get empty cards in search results.
what type of loop did you create is it for post, product, or custom post type
this theme name? plz reply!
hello theme by elementor how ever everything you see there is custom made. If you follow my videos on loop you will see how i created what you are seeing there