One common mistake might occur while creating a search results page in the Elementor – picking the wrong page template. Many users create a WordPress search template instead of a WooCommerce search template.
Notice: if you’re not very familiar with Elementor, please read our article on building an Elementor pop-up. We described its workflow and layout in detail, so it might help with any Elementor-related cases.
To begin with:
Go to Templates ->
Theme Builder ->
2. Create a Product Archive page
3. Add Archive Products and the Archive title widget to your template.
4. After finishing creating a template, set the condition to
That way, the search results page will be created properly.
Check if you have more than one Product Archive template.
If so, open all templates that aren’t “
Search Results” and add an extra condition:
Sometimes excluding “Search Results” from the Shop page still doesn’t work. In such cases, create an empty
search.php file in the root of your child theme and paste there the following code. The
$template_id variable is the post ID of the Elementor template with WooCommerce search results. You can find this ID on the URL. Go to Templates -> Theme Builder -> Products Archive and open the template with the search results. The URL should be like this
https://your-domain.com/wp-admin/post.php?post=100&action=elementor. In this case, the
100, but in your case, it will be a different number.
<?php $frontend = new \Elementor\Frontend(); $template_id = 100; // Your search results template ID echo $frontend->get_builder_content_for_display( $template_id, $with_css = true );