To get your site to load external JS file (e.g. The url for your file will look something like this: Locate your child theme folder and create a js folder in it and upload your file inside of this folder. If you’re using cPanel, go to File Manager to access your site’s files. You would need to login to your WordPress site via FTP or cPanel, whichever method you prefer. my-scripts.js) and use this method to include it. You can also place your code in a file with JS extension (e.g. Make sure the “Enable header code” option is checked, and paste your code below. To add a code to every page navigate to Divi Theme Options > Integration tab. But if you want your code to run on every page, it would be better to add it to the tag of your website via Theme Options. Using Code Module is a good option if you want your code to run only on one specific page. This is the code used in the example above: Simply paste your code in the Code Module, like this: You need to make sure your code is wrapped in tags. One of options would be to use the Code Module. There is a few ways you can go about doing it. Let’s say you’ve found a JavaScript (or jQuery, which is the “Write Less, Do More” JavaScript library) code snippet and you’d like to include it in your Divi website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |