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 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.

  1. Enter your custom JS code in the the code editor and or add scripts links.
  2. 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. To use custom javascript files, simply upload them to the UXi media library and copy / paste the URL.

  1. Click the Add Script button to add a new script link.
  2. Enter the URL of the script. This should be a UXi media library URL or another viable CDN.
  3. 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.
    1. Select Page in the Output Location option.
    2. Select the page from the dropdown list.
  • Layout: Output the script link on any page using the selected layout.
    1. Select Layout in the Output location option.
    2. Select a layout from the dropdown list.
  • Click Update Custom JS

  • Use the X button to the right to delete a script link.