0

When I place this code :-

$(".social-icons").after('<span id="siteseal" style="style="cursor: hand;"></span>');
$.getScript("https://seal.godaddy.com/getSeal?sealID=beP8DWYRCbG8YIK0Chdr8BKQQsmmOG3jEF1rddbw106hSZicW0fWglZgVTRQ",function(){"";
});

at the end of the HTML for footer_cms_content, it just displays the the code itself instead of the Godaddy Trust Seal. Is it possible to place it in this cms block for footer?

Thanks.

2 Answers 2

1

I am only for you suggest. may be help you

Magento 2 jquery or javascript not add in cms block SO you create the simple the .phtml file and call the your footer cms block like :-

{{block class="Magento\Framework\View\Element\Template" template="Vendor_Module::myfiles/myfile.phtml"}}
1
  • Thanks Mohit. This is the right way to do it given the fact that the code includes jquery. Mar 12, 2020 at 4:21
1

I would create a static block with your code and then call the static block via /app/design/frontend/Vendor/theme/Magento_Theme/layout/default.xml

<block class="Magento\Cms\Block\Block" name="godaddy.seal" before="-">
    <arguments>
        <argument name="block_id" xsi:type="string">block_code_name</argument>
    </arguments>                    
</block>

<move element="godaddy.seal" destination="footer_cms_content" before="-"/>

1
  • thanks for the solution. I shall keep this in mind for one of the upcoming projects. Mar 12, 2020 at 4:23

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.