1

I have created block title Footer Links Block and block identifier footer_links_block and added bellow code into block.

<div class="row">
<div class="col-sm-9 pad_right">
<div class="qucik_link">
<div class="sitemap">
<ul class="footer_link">
<li><a> Quick Links</a>
<ul>
<li><a title="About Us" href="{{store url="about-als"}}" target="_self">About Us</a></li>
<li><a href="{{store url="become-a-carepartner"}}">Become a Care Partner</a></li>
<li><a title="Article" href="{{store url="article"}}" target="_self">Knowledge Centre</a></li>
<li><a href="{{store url="latest-offers"}}">Latest Offers</a></li>
<li><a title="News &amp; Article" href="{{store url="news"}}" target="_self">News &amp; Articles</a></li>
<li><a title="FAQ" href="{{store url="faq"}}" target="_self">FAQs</a></li>
{{block class="Als\ThemeExt\Block\TrackLink" template="Als_ThemeExt::tracklink.phtml"}}
<li><a href="{{store url="contact-us"}}">Contact Us</a></li>
</ul>
</li>
</ul>
</div>
<div class="sitemap">
<ul class="footer_link">
<li><a> Shop by</a>
<ul>
<li><a href="{{store url="ruminants.html"}}">Ruminants</a></li>
<li><a href=" {{store url="Pets.html"}}">Pets</a></li>
<li><a href=" {{store url="equines.html"}}">Equines</a></li>
</ul>
</li>
</ul>
</div>
<div class="sitemap">
<ul class="footer_link">
<li><a> Our Policies</a>
<ul>
<li><a href=" {{store url="terms-and-conditions"}}">Terms and Conditions</a></li>
<li><a href=" {{store url="privacy-policy-cookie-restriction-mode"}}">Privacy Policy</a></li>
<li><a href=" {{store url="shipping-returns-cancellation"}}">Shipment</a></li>
<li><a href=" {{store url="order-cancellation"}}">Order Cancellation</a></li>
<li><a href=" {{store url="replacement"}}">Replacement</a></li>
<li><a href="{{store url="disclaimer"}}">Disclaimer</a></li>
<li><a href="http://amaruventures.co.in/demo1/als_demo/compliance">Compliance</a></li>
</ul>
</li>
</ul>
</div>
<div class="sitemap">
<h3>Call us for any assitance <strong>1800-212-5500</strong></h3>
<div class="social_icon">
<h3>Follow us on</h3>
<ul>
<li><a href="https://www.facebook.com/alsvetcarecom-321977024847350 "><i class="fa fa-facebook"></i></a></li>
<li><a href="https://www.twiter.com/alsvetcare/"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://www.linkedin.com/company/alsvetcare.com"><i class="fa fa-linkedin"></i></a></li>
<li><a href="https://www.instagram.com/alsvetcare/"><i class="fa fa-instagram"></i></a></li>
<li><a href="https://plus.google.com/+alsvetcare"><i class="fa fa-google-plus"></i></a></li>
</ul>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="col-sm-3">
<div class="shipping_data">
<ul>
<li><span><i class="fa fa-inr"></i></span> Cash on Delivery*</li>
<li><span><i class="fa fa-undo"></i></span> 3 Days Return*</li>
<li><span><i class="fa fa-truck"></i></span> Free Shipping*</li>
</ul>
</div>
</div>
</div>

after that add fallowing code in app\design\frontend\Magenticians\Mytheme\Magento_Theme\layout\default.xml

<referenceContainer name="footer-container">
    <container name="footer-top" label="Footer Top" htmlTag="div" htmlClass="quick_bg" before="-">
    <container name="footer-top-container" label="Footer Top Container" htmlTag="div" htmlClass="container" before="-">
    <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" template="switch/stores.phtml"/>
    <block class="Magento\Cms\Block\Block" name="footer_links_block">
        <arguments>
            <argument name="block_id" xsi:type="string">footer_links_block</argument>
        </arguments>
    </block>
    </container>
    </container>
</referenceContainer>

after that ran all CLI command. but its not working for me.

2
  • Try with <referenceContainer name="footer"> instead of <referenceContainer name="footer-container"> Dec 28, 2017 at 8:31
  • php bin/magento cache:clean try this and check it. Dec 28, 2017 at 8:32

2 Answers 2

1
  <referenceBlock name="footer_links" remove="true" />
  <referenceBlock name="form.subscribe" remove="true" /> 

1. Add Above Code in

app\design\frontend\Magenticians\Mytheme\Magento_Theme\layout\default.xml

2. Go to Content > Widgets > Add Widget

a. Select Type > CMS Static Block | Desgin Theme > Your Theme => Click Continue

b. See "Layout Updates" Tab in Storefront Properties:

      i. Display On : All Pages
     ii. Container : CMS Footer Links 

c. Go to Widget Option and select your Block.

4
  • I fallowed above state but i did not get anything. Dec 28, 2017 at 9:56
  • Have you added this in your custom theme default.xml : <referenceBlock name="footer_links" remove="true" /> <referenceBlock name="form.subscribe" remove="true" /> Dec 28, 2017 at 10:01
  • yes i have added above code in my default.xml... Dec 28, 2017 at 10:04
  • after added above code in deafult.xml i am getting this on footer link "We're sorry, an error has occurred while generating this email." and copyright Dec 28, 2017 at 10:20
0

Now try this.

app\design\frontend\Magenticians\Mytheme\Magento_Theme\layout\default.xml

        <referenceContainer name="footer-container">
        <container name="footer.top" label="footer top" htmlTag="div" htmlClass="footer-top">
            <container name="footer.top.container" label="footer top Container" htmlTag="div" htmlClass="container">
                <container name="top.left.container" htmlTag="div" htmlClass="col-lg-9 col-md-9 col-xs-12">     
                    <block class="Magento\Newsletter\Block\Subscribe" name="form.subscribe" as="subscribe" before="-" template="subscribe.phtml"/>
                </container>
            </container>
        </container>
         <container name="footer.static" label="footer static" htmlTag="div" htmlClass="footer-static">
            <container name="footer.static.container" label="footer static Container" htmlTag="div" htmlClass="container">
                <block class="Magento\Cms\Block\Block" name="footer_static">
                    <arguments>
                        <argument name="block_id" xsi:type="string">footer_static</argument>
                    </arguments>
                </block>
            </container>
        </container> 
        <container name="footer.copyright" label="footer copyright" htmlTag="div" htmlClass="footer-copyright">
            <container name="footer.copyright.container" htmlTag="div" htmlClass="container">
                <container name="copyright.left.container" htmlTag="div" htmlClass="col-lg-6 col-md-6 col-xs-12">   
                    <block class="Magento\Theme\Block\Html\Footer" name="my-copyright" template="html/copyright.phtml"/>
                </container>
                <container name="copyright.right.container" htmlTag="div" htmlClass="col-lg-6 col-md-6 col-xs-12">
                    <block class="Magento\Cms\Block\Block" name="footer_payment">
                        <arguments>
                            <argument name="block_id" xsi:type="string">footer_payment</argument>
                        </arguments>
                    </block>
                </container>
            </container>
        </container>
    </referenceContainer>
    <referenceBlock name="copyright" remove="true"/>
    <referenceBlock name="footer_links" remove="true"/>
    <referenceBlock name="report.bugs" remove="true"/>
11
  • still not working for me. Dec 28, 2017 at 9:58
  • update code in my theme default.xml file so it will help you Dec 28, 2017 at 10:03
  • <block class="Magento\Cms\Block\Block" name="header_social1"> <arguments> <argument name="block_id" xsi:type="string">header_social</argument> </arguments> </block> Dec 28, 2017 at 10:07
  • what is header_social1 and header social can you explain Dec 28, 2017 at 10:08
  • my theme functionality etc. Dec 28, 2017 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.