3 added 120 characters in body
source | link

For adding custom footer you need to create following file:

app/design/frontend/Cloudways/m2-theme/Magento_Theme/layout/default.xml

With following content:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container">
            <block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
        </referenceContainer>
    </body>
</page>

Now you need to create footer.phtml at

app/design/frontend/Cloudways/m2theme/Magento_Theme/Magento_Theme/templates/html

Now you can call all content using static block in footer.phtml.

Update I

If you need custom header you need to add following code same as footer i.e

<referenceContainer name="header.container">
    <block class="Magento\Theme\Block\Html\Footer" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
    <move element="minicart" destination="myheader"/>
    <move element="top.search" destination="myheader"/>
    <move element="logo" as="logo" destination="myheader"/>
    <move element="catalog.topnav" as="nav" destination="myheader"/>

Above code will Set new template for header and move tag will move existing element to new header.

Now you need to echo this element in your custom header with following code.

<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>
<?php echo $this->getChildHtml("nav"); ?>

Source

For adding custom footer you need to create following file:

app/design/frontend/Cloudways/m2-theme/Magento_Theme/layout/default.xml

With following content:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container">
            <block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
        </referenceContainer>
    </body>
</page>

Now you need to create footer.phtml at

app/design/frontend/Cloudways/m2theme/Magento_Theme/Magento_Theme/templates/html

Now you can call all content using static block in footer.phtml.

Update I

If you need custom header you need to add following code same as footer i.e

<referenceContainer name="header.container">
    <block class="Magento\Theme\Block\Html\Footer" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
    <move element="minicart" destination="myheader"/>
    <move element="top.search" destination="myheader"/>
    <move element="logo" as="logo" destination="myheader"/>

Above code will Set new template for header and move tag will move existing element to new header.

Now you need to echo this element in your custom header with following code.

<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?> 

Source

For adding custom footer you need to create following file:

app/design/frontend/Cloudways/m2-theme/Magento_Theme/layout/default.xml

With following content:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container">
            <block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
        </referenceContainer>
    </body>
</page>

Now you need to create footer.phtml at

app/design/frontend/Cloudways/m2theme/Magento_Theme/Magento_Theme/templates/html

Now you can call all content using static block in footer.phtml.

Update I

If you need custom header you need to add following code same as footer i.e

<referenceContainer name="header.container">
    <block class="Magento\Theme\Block\Html\Footer" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
    <move element="minicart" destination="myheader"/>
    <move element="top.search" destination="myheader"/>
    <move element="logo" as="logo" destination="myheader"/>
    <move element="catalog.topnav" as="nav" destination="myheader"/>

Above code will Set new template for header and move tag will move existing element to new header.

Now you need to echo this element in your custom header with following code.

<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>
<?php echo $this->getChildHtml("nav"); ?>

Source

2 added 899 characters in body
source | link

For adding custom footer you need to create following file:

app/design/frontend/Cloudways/m2-theme/Magento_Theme/layout/default.xml

With following content:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container">
            <block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
        </referenceContainer>
    </body>
</page>

Now you need to create footer.phtml at

app/design/frontend/Cloudways/m2theme/Magento_Theme/Magento_Theme/templates/html

Now you can call all content using static block in footer.phtml.

Update I

If you need custom header you need to add following code same as footer i.e

<referenceContainer name="header.container">
    <block class="Magento\Theme\Block\Html\Footer" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
    <move element="minicart" destination="myheader"/>
    <move element="top.search" destination="myheader"/>
    <move element="logo" as="logo" destination="myheader"/>

Above code will Set new template for header and move tag will move existing element to new header.

Now you need to echo this element in your custom header with following code.

<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?> 

Source

For adding custom footer you need to create following file:

app/design/frontend/Cloudways/m2-theme/Magento_Theme/layout/default.xml

With following content:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container">
            <block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
        </referenceContainer>
    </body>
</page>

Now you need to create footer.phtml at

app/design/frontend/Cloudways/m2theme/Magento_Theme/Magento_Theme/templates/html

Now you can call all content using static block in footer.phtml.

For adding custom footer you need to create following file:

app/design/frontend/Cloudways/m2-theme/Magento_Theme/layout/default.xml

With following content:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container">
            <block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
        </referenceContainer>
    </body>
</page>

Now you need to create footer.phtml at

app/design/frontend/Cloudways/m2theme/Magento_Theme/Magento_Theme/templates/html

Now you can call all content using static block in footer.phtml.

Update I

If you need custom header you need to add following code same as footer i.e

<referenceContainer name="header.container">
    <block class="Magento\Theme\Block\Html\Footer" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
    <move element="minicart" destination="myheader"/>
    <move element="top.search" destination="myheader"/>
    <move element="logo" as="logo" destination="myheader"/>

Above code will Set new template for header and move tag will move existing element to new header.

Now you need to echo this element in your custom header with following code.

<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?> 

Source

1
source | link

For adding custom footer you need to create following file:

app/design/frontend/Cloudways/m2-theme/Magento_Theme/layout/default.xml

With following content:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container">
            <block class="Magento\Theme\Block\Html\Footer" name="footer" template="html/footer.phtml"/>
        </referenceContainer>
    </body>
</page>

Now you need to create footer.phtml at

app/design/frontend/Cloudways/m2theme/Magento_Theme/Magento_Theme/templates/html

Now you can call all content using static block in footer.phtml.