Hello Magento Friends,

How are you all? Today I will deliver a solution on How to Change Category Page Layout for Specific Category Only in Magento 2.

Sometimes you need to change the layout or design for some specific category, while other categories remain the same in Magento 2. Or sometimes you need to temporarily change the design for some specific category in Magento 2. Then, the following code will help to accomplish your requirement.

Let’s proceed,

Steps to Change Category Page Layout for Specific Category Only in Magento 2:

Step 1: First you need to add the following file.

app\design\frontend\Themes\Yourtheme\Magento_Catalog\layout\catalog_category_view_id_{{id}}.xml 

NOTE: Here you need to replace {{id}} with real category id

Now, add the below code,

Step 2: Now you need to add the following file.

app\design\frontend\Themes\Yourtheme\Magento_Catalog\templates\product\ customlist.phtml

Note: Now you can add your custom code or design in this file for your custom product list for a specific category.

Conclusion:

Hence, this way you can Change Category Page Layout for Specific Category Only in Magento 2. If you come across any issues with the above code, mention them in the comment section. I will help you to solve it. Do not forget to share the article amongst your friends’ group and stay in touch with us!

Happy Coding!

Click to rate this post!
[Total: 7 Average: 3.9]