UXi® Custom JS allows you to add custom javascript or jQuery code to your site. There are two options for this on the Custom JS dashboard. Custom JS at the top allows custom javascript to be written and loaded from an external file, and script links allow linking to third-party javascript sources.
To get started, navigate to UXi® Settings > Custom JS.
Entering Custom JavaScript
The code entered here will output in a Javascript file linked in the Footer of the site.
Its URL will look like http://uxisite.com/wp-admin/admin-ajax.php?action=uxi_site_custom_js.
- Enter your custom JS code in the the code editor field and/or add scripts links.
- Click Update Custom JS.
Add Scripts Link(s)
Enter links to external JavaScript file URLs. These links will output in the location selected in the steps below - you can add scripts to the <head> and <footer> of any page on your site, apply them to every page on a layout, or apply them to your entire website.
To use custom javascript files, simply upload them to the UXi® media library and copy / paste the URL.
- Click the Add Script button to add a new script link.
- Enter the URL of the script. This should be a UXi media library URL or another viable CDN.
- Set the HTML Location where the script link will output. Options are:
- Head: Output the script at the end of the tag.
- Footer: Output the script link at the end of the tag.
- Select an output location. Options are:
-
- Page: Output the script on one specific page.
-
- Select Page in the Output Location option.
- Select the page from the dropdown list.
-
- Layout: Output the script link on any page using the selected layout.
-
- Select Layout in the Output location option.
- Select a layout from the dropdown list.
-
- Click Update Custom JS.
Comments
0 comments
Article is closed for comments.