Zend certified PHP/Magento developer

Create a custom layout for certain categories in 2.4

I want to create a custom layout for one or more categories. I followed the next steps:

  • Extended and customized <theme_dir>Magento_Cataloglayoutcatalog_category_view.xml (layout instructions work fine)
  • Created the custom layout <theme_dir>Magento_Themepage_layoutcustom-category-layout.xml

custom-category-layout.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>
    <body>
        <referenceBlock name="footer" remove="true" />
    </body>
</layout>
  • Then added the layout in <theme_dir>Magento_Themelayouts.xml

layouts.xml

<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="custom-category-layout">
        <label>Category custom layout</label>
    </layout>    
</page_layouts>

  • Cleared the cache.
  • Selected the Category custom layout in the category.
  • Cleared the cache.
  • But layout instructions are not reflected on the browser.

What am I missing?