Magento 2.1 – Change Search Page Column Layout to One Column

advanced-searchcatalogsearchlayoutmagento2

I've been searching for a while and I am only finding answers DevDocs that tell me that in order to modify the column layout for the search results page is to change the xml found in app/design/frontend/<Vendor>/<theme>/Magento_CatalogSearch/layout/
My problem is that my folder structure for my theme does not have a layout folder. Seems like remember seeing the layout setting in the backend config somewhere, but cannot seem to find it there either.

Any search that I perform on my website is resulting in a 4-column layout and I only want a 1-column layout or maybe 2-column with left sidebar. …all the same for advanced search.

I am using Magento 2.1.4.

Best Answer

In your theme create the catalogsearch_result_index.xml in following path: app/design/frontend/<Vendor>/<your_theme>/Magento_CatalogSearch/layout/catalogsearch_result_index.xml

Add the below content to xml file.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Advanced Search</title>
    </head>
</page>

This way you can set column layout for search result page.

EDIT:

If need 1 column layout, need to change in

layout="2columns-left"

to

layout="1column"
Related Topic