Hello,
I'm using MAGENTO 2.2.1 and blank theme. I wanted to chance footer links at blank theme.
How can I do that? I have tried several ways, but nothing works.
Regards,
Isaria
Solved! Go to Solution.
Hello @i_isaria,
There are some code format and node missing issue. Please check below code
<?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> <referenceBlock name="privacy-policy-link" remove="true"/> <referenceBlock name="search-term-popular-link" remove="true"/> <referenceBlock name="contact-us-link" remove="true"/> <referenceBlock name="catalog-search-advanced-link" remove="true"/> <referenceBlock name="footer_links"> <block class="Magento\Framework\View\Element\Html\Link\Current" name="your-link-name"> <arguments> <argument name="label" xsi:type="string">Title</argument> <argument name="path" xsi:type="string">path-of-your-page</argument> </arguments> </block> </referenceBlock> </body> </page>
After Please clear cache and deploy static content.
--
If my answer is useful, please Accept as Solution & give Kudos
Hello @i_isaria,
"About us" link and "Customer Service" link: Static block with Identifier is "footer_links_block"
To remove other links, use xml file (default.xml) and add this code into < body > tag:
<referenceBlock name="name_of_link_block" remove="true"/>
Name of link block:
To add new links to footer links, use this code:
<referenceBlock name="footer_links"> <block class="Magento\Framework\View\Element\Html\Link\Current" name="your-link-name"> <arguments> <argument name="label" xsi:type="string">Title</argument> <argument name="path" xsi:type="string">path-of-your-page</argument> </arguments> </block> </referenceBlock>
--
If my answer is useful, please Accept as Solution & give Kudos
I have made the following:
Modified (after your instructions) the file c:\xampp\htdocs\magento\vendor\magento\theme-frontend-blank\Magento_Theme\layout\default.xml with this code:
<body> tag <referenceBlock name="privacy-policy-link" <referenceBlock name="search-term-popular-link" <referenceBlock name="contact-us-link" <referenceBlock name="catalog-search-advanced-link" <referenceBlock name="sales-guest-form-link" remove="true"/> <block class="Magento\Framework\View\Element\Html\Link\Current" name="your-link-name"> <arguments> <argument name="label" xsi:type="string">Title</argument> <argument name="path" xsi:type="string">path-of-your-page</argument> </arguments> </block> </referenceBlock>
and flushed MAGENTO Cache and no changes happens
Hello @i_isaria,
There are some code format and node missing issue. Please check below code
<?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> <referenceBlock name="privacy-policy-link" remove="true"/> <referenceBlock name="search-term-popular-link" remove="true"/> <referenceBlock name="contact-us-link" remove="true"/> <referenceBlock name="catalog-search-advanced-link" remove="true"/> <referenceBlock name="footer_links"> <block class="Magento\Framework\View\Element\Html\Link\Current" name="your-link-name"> <arguments> <argument name="label" xsi:type="string">Title</argument> <argument name="path" xsi:type="string">path-of-your-page</argument> </arguments> </block> </referenceBlock> </body> </page>
After Please clear cache and deploy static content.
--
If my answer is useful, please Accept as Solution & give Kudos