Custom coding guidelines

  • Knowledge Base
  • Responsive Website Builder
  • Custom coding guidelines
  • Duda Support > Responsive Website Builder > Editing a Site

Overview

Our editor is very flexible in that you can extend the functionality of your site by adding any custom script or code, though the custom code has a tendency to break or disable the editor or require other steps to be done to work. Because of that, we have some guidelines that you should follow whenever testing custom code.

HTTP vs HTTPS

If you're working with custom code, it's good to know that scripts and resources can only be loaded in the same HTTP or HTTPS.

The editor by default is always loaded in HTTPS. If you're using an HTTP script in the editor, it will not be visible in the editor since it's loaded over a secure connection but will be visible on the live site since it's loading in an unsecured connection.

To fix this, it's always better to load your resources over a secure connection.

For code that needs to be placed in the header

Create a duplicate of the site, then test your code on the duplicate site. If it fails, you can simply delete the site.

Alternatively, you can test the header code on a separate, blank page on the same site. If the page crashes, simply delete the page or access the code via developer mode.

For code that needs to be placed on a page

  1. Create a duplicate of the page, then add in your custom code.
  2. If it fails, you can actually navigate to the page's HTML/CSS by going to another page and accessing developer mode from there
  3. You can also delete the page and start again by creating a duplicate.
  4. If custom code is on your homepage, you can try accessing your editor by adding a /contact or some other URL to the end of your editor's link


Always disable animated navigation

Duda's animated navigation feature often interferes with the way the custom code is loaded. You can disable animated navigation in responsive websites by going to right-clicking your navigation element in your editor >>> edit >>> turn off animated navigation.

Notes and considerations

If custom code broke your site, be sure to file a report here.

Troubleshooting

Help! Custom coding broke my site!

A site is broken by coding normally loads a blank page in the editor (or breaks your editing features). If custom code broke your site, there are several options available to you.

  • If you have a backup, restore to it from site settings >>> backup versions >>> restore to backup.

  • If that doesn't work, try logging into http://my.duda.co?nossl which is a more code friendly version of our platform.

  • If you're unable to access that in your editor by loading it, you might be able to workaround it by loading a new page.

    To fix this issue, try accessing your editor on a new page. You can do this by entering a different URL in your editor link. This is a link accessing the "about us" of a site, for example; https://my.duda.co/home/site/XXXXXXX/about

Duda's policy on custom coding

Due to the unpredictable nature the f custom code, we are unable to troubleshoot why a custom coded element might not be working on a site.

Do you have anyone who can troubleshoot my code?

We currently don't don't have any developers available to troubleshoot custom code, so please follow the guidelines above when experimenting with custom code on your site.

×

Priority Phone Support

English phone support is available 18 hours a day,
Monday through Friday, 3am to 9pm (EST).

United States +1 866-776-1550 3am to 9pm (Eastern)
United Kingdom +44 (0)800-011-9071 8am to 2am (London)
France +33 (0)9-75-18-84-74 9am to 3am (Paris)
Israel +972 (0)3-720-8922 10am to 4am (Jerusalem)
Australia +61 (0)2-8880-9166 7pm to 1pm (Sydney)
To schedule a call in French, Portuguese, Hebrew or Russian, please email us at prioritysupport@duda.co
×

Please Log in as a DudaPro

Priority Phone Support is available exclusively to DudaPros. Log in to your DudaPro account now to see our international support numbers.

Log In
Not a DudaPro? Start a free trial now!