cancel
Showing results for 
Search instead for 
Did you mean: 

what is public file to add code another websites service

what is public file to add code another websites service

hi gays web site https://www.addthis.com/ fro social media icons show in my sit need put this

 

code in my web site but idont know whitch file and path... help me thank you Install Code
<!-- Go to www.addthis.com/dashboard to customize your tools --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5f3b358418538685"></script>
1 REPLY 1

Re: what is public file to add code another websites service

Hello @YousifAlJudi2020 

 

I am assuming that you just want to add one JS for all pages :

 

Step 1: Firstly you need to create default.xml at app\code\[Vendor]\[Module]\view\frontend\layout\default.xml

 

<?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">

    <head>

    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5f3b358418538685"></script>

    </head>

</page>

Step 2: Run below command :

php bin/magento cache:flush

and then check in source code if you are getting it.

 

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy