Header and Footer Script Loader - Adding a Script
Adding a Script
You can add unlimited number of scripts and styles. This guide covers how to add them.
Finding the Script List
Head to Admin Dashboard → CM Header and Footer Script Loader.
Clicking on it or Settings will direct you to the script list.
Adding a Script
- 1
-
Enter the Script and Script Name
in the first box provided. (Example: Google Analytics Code). The script name will help you later identify your scripts and styles but other than this does not have any impact.
- A. Enter the Script Name in the box.
- B. Enter the Script Code in the box provided.
- You can also use the Disable Script toggle to disable
- 2
-
Choose the Settings
On the right side of the box, choose the settings for the script.
- A. Choose between CSS and JS from the drop down menu to select a Script Type.
This is useful when you didn't place tags around the script (for example <script></script>). In such cases the plugin will automatically add the tags and wrap the script with them. - B. Choose from the drop down menu to select a Script Location. This is important aspect to help you optimize your WordPress site performance. Select from:
- Header Script
- Footer Script
- After opening body tag
- C. Choose from the drop down menu to select the Autoload Option. There are five options.
- Load by default on All Posts and Pages - The script will always load unless per specific posts it will be turned off
- Load on Homepage - Loads only on the page specified as homepage
- Load on Specific Posts - This will let you choose in which custom posts type the script will load
- Load on specific Urls - Specify in which URLs the script will load.
URL Tips
- Accepts full URLs.
- For instance, www.test.com/directory-1/example-post.html
- Accept parts of URLs and directory names.
- For instance, if you write "example-page/", it WILL include the URL www.test.com/directory-1/example-post
- Will load any sub directory of a directory by using *.
- For instance, "www.test.com/directory-1/*" WILL include www.test.com/directory-1/example-post
- Accepts regex patterns.
- For instance, the pattern "((/directory-1/*/)|(/directory-2/*/))" will add the script to all pages inside "directory-1/" and "directory-2/"
- For more information about regex, you can check regex testers such as the Online regex tester and debugger.
- Accepts full URLs.
- Don't load by default - This will prevent the script from loading automatically and will still leave the option to turn it on per specific posts and pages (requires Pro)
- D. Choose which device types will trigger the script. There are three options:
- All Devices
- Desktop
- Mobile
- A. Choose between CSS and JS from the drop down menu to select a Script Type.
- 3
-
Click Add
Click on the blue Add New button to add a new box. You can add unlimited number of scripts and styles.
- 4
-
Save Changes
Click on the blue Save Changes button before leaving the settings screen.
Deleting Scripts
Click the Delete button in the upper right hand corner to delete the box.
![]() |
More information about the CM Header and Footer Script Uploader WordPress Plugin Other WordPress products can be found at CreativeMinds WordPress Store |
![]() |
Let us know how we can Improve this Product Documentation Page To open a Support Ticket visit our support center |