How to Add Page-Specific Code Using the Global PageName Function

Written by Jordan K Updated over a week ago

You can write code that will only execute on specific pages of your storefront (for example, product pages only, category pages only, etc.). As always, please archive your theme before making any changes.

After you've written your page-specific code, paste it into the script provided below. Then, put the full script (with your custom code) into your template_xx.html file, where "xx" is the name or ID number of your theme, at Design > File Editor > Shortcuts.