How to change layout of product detail page in Magento 2?

Page Details page or any other page like category is the same but something you need to care.

Everyone gives you a solution just catalog_product_view.xml and change layout to a specific column like

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

to

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

But believe me you will found many catalog_product_view.xml in your project, you need to change the specific one. If you are using default luma theme, then enhance to the theme and make the changes.

Keep in mind the priority is a theme, not an extension.

Was this article helpful?

Related Articles

Leave A Comment?