Custom code

You can use custom code to further customize your website, Ycode supports adding client-side code but does not support server-side code like PHP, Ruby, Ruby on Rails and SQL.

Note: Custom code is an advanced modification that’s not included in the Ycode support. If we’re troubleshooting issues with your web project, we might ask you to remove it so we can determine if the custom code is the root of the issue.

Adding custom code

  • Click on Settings (gear icon) in the left navigation bar.

  • Go to Custom code

  • Add valid HTML or scripts into the header or/and body fields

  • After adding your code, click Save changes.

Custom code is now injected into the <head> tag or/and the <body> tag on every website page

Custom code doesn’t appear

Does your custom code not appear on your website? This can have a few reasons:

  • You’re logged in. For security reasons, sometimes code doesn’t appear when you’re logged in—even when visitors can see it. This is because you’re viewing embedded JavaScript over a secure HTTPS connection. Open your page in incognito mode to see if the code does display.

  • It’s on an index page. If you’ve added your code to an index page, rendering issues can occur. To double-check this, remove your page from the index in the Pages tab, and open your website in an incognito browser tab.

None of the above? Try going to the source of the code and ask for help there. Unfortunately, Ycode’s support team cannot help you troubleshoot issues with third-party or external code.