How to Change Search Result Page Layout in Magento 2
Do you want to customize the search result page in your Magento 2 store?
Read this complete blog post to find out the method to change the layout of the search page in Magento 2.
The shopping experience perceived by the customers on your online store matters a lot. It can make or break your online business. Therefore, you may need to optimize each and every point of the visitor’s interaction with your store. One such important point is the catalog search results page.
According to one report by Forrester, 43% of the visitors on retail eCommerce sites directly navigate to the search bar. That’s huge! In such a scenario, the catalog search results page becomes vital from the user experience point of view. The layout of the default Magento 2 catalog search result page is good, but it can be further optimized to deliver a better user experience.
Earlier, we also posted a step-wise guide on updating the layout using an observer in Magento 2. In this blog post, I will show you how to change search result page layout in Magento 2.
Method to Change Search Result Page Layout in Magento 2
To change the layout of the search page in Magento 2, we need to override the layout file of that page in the theme.
Override the app/design/frontend/<Vendor>/<theme>/Magento_CatalogSearch/layout/catalogsearch_result_index.xml file with your desired layout, for example:
1 2 3 4 5 6 |
<!--?xml version="1.0"?--> |
Simply add the layout code between the <page>
tag and save the file.
That’s it!Configure Magento 2 default page layout as it allows you to set the initial appearance and structure of your online store’s web pages, ensuring a consistent and user-friendly design.
This is how easily you can change the catalog search result page layout in Magento 2.
If you still have any doubts or queries regarding the solution, feel free to ask. 😇
Please rate the post with 5 stars if it has helped you. Also, do not forget to share this helpful post with your Magento friends via social media. 🔗
Thanks for reading. 🍀
Siddharth Nandava
Siddharth Nandava is an enthusiastic Jr Magento developer at Meetanshi. Apart from the work, you can find him learning new things and spending quality time with his family.
Prev
25+ Social Media Statistics & Facts You Need to Know [2024]
30 WooCommerce Statistics You Need to Know [2024]
Next