Developer Options connects custom code and external services to a Sitely website. Use a native element or Site Settings integration when one already handles the task; use developer fields when a provider supplies code that needs a specific place.

Choose the right place for code

PHP before HTML runs on the web server before the page’s markup is sent. Code for HTML <head> belongs inside the document’s head, such as links to scripts, styles or metadata. An Embed element places visible HTML content in the page body.

These locations serve different purposes. Follow the service’s instructions for each supplied piece rather than pasting the whole package into one field. The code illustrations on this page show placement; they are not a ready-made membership system.

The Developer code button marked with angle brackets appears beside the page type in the Page inspector.

Run PHP before the page markup

In the Page inspector, click the </> button beside the page type to open Developer. Use PHP before HTML (this page) for server-side setup that must run before output. A provider might use it to load an application or check a session before rendering the page. The following illustration is a third-party PHP snippet.

Illustration of PHP supplied by a third-party membership system.

Add code to this page’s head

Use Code for HTML <head> (this page) for the provider’s head markup. It is part of the HTML document, rather than the separate server-side PHP stage above it. The page Code panel keeps the two fields distinct.

For a normal script or stylesheet supplied as a head tag, use the HTML head field. PHP that must run before any HTML belongs in the PHP field. Check the provider’s required execution order when several files depend on one another.

Developer popup with the PHP before HTML and Code for HTML head fields for the current page.

Place visible content with Embed

Insert an Embed element where the form, booking widget or other visible content should appear. Paste the provider’s body markup into its content editor, then save or refresh it. The HTML example below belongs in the body; the inspector illustration shows where embedded content is configured.

Size the element for its initial content and choose the appropriate height handling. Enable Content expands vertically when the widget reports a changing height and should make room below it. This does not turn an arbitrary remote page into responsive content, so test the supplied widget’s own behavior.

Illustration of body HTML for a third-party registration form.
Embed inspector with content editor, refresh control and height-handling options.

Use the save/refresh control after editing the embed. Some services render in Preview, while others require a published HTTPS origin, domain registration or server-side processing. A successful canvas preview does not verify PHP on the hosting server.

Set site-wide developer options

Open Site Settings > Developer options for settings shared by the website. Output folders organize CSS, JS, images, protected images, video, audio, downloads and social assets. Keep their paths consistent with any custom code that refers to those resources.

Add timestamp to CSS and JS file names helps browsers receive newly generated versions. Store images in sub-folders of the images folder controls that output organization. Review an existing site’s custom references before changing those paths.

Site-wide Developer options for output folders and custom CSS and JavaScript.

Include custom CSS and JavaScript

Choose a CSS File or JS File to include its contents with the project, or supply a Linked CSS or Linked JS URL for a hosted resource. A local copy and a linked resource have different update responsibilities: replace the project’s copy when its source changes, or maintain the external URL when linking.

A service may supply HTML, CSS and JavaScript separately, as the editor illustration below shows. Put the visible HTML in Embed, include its CSS and JavaScript using the intended fields, and retain the dependencies and initialization order specified by the service.

An editor displaying HTML, CSS and JavaScript in separate panels.

Run PHP before HTML on every page

Open Site Settings > Developer and use PHP before HTML (all pages). Use it for shared server-side initialization. The site-wide PHP runs before the page-specific PHP, and both run before HTML output.

Sitely marks pages containing PHP as requiring PHP output. Check the generated filenames, especially when using custom filenames, and publish to a PHP-capable host. Site-wide PHP can affect every published page, so test that shared setup across the site.

Keep site-wide head code separate

Code for HTML <head> (all pages) adds head markup across the website. The illustration below shows this separate field. Put server-side pre-output code in PHP before HTML (all pages), not in the head-code field.

Site-wide head code is activated before Sitely’s privacy banner and user consent. For services that depend on consent, use the relevant native privacy integration or implement the provider’s consent workflow. See Privacy for Sitely’s consent settings.

Site-wide Code for HTML head field, separate from PHP before HTML.

Test on the intended host

Review the exported page in a browser and test server-side features on a staging location with the same hosting requirements as the final site. Check loading order, console and server errors, expanding content and alternate layouts before publishing the final change.

Custom code remains the responsibility of its author or provider. Keep a working copy before replacing it, and remove or correct an integration that prevents the page from working. See Preview and Publishing for the testing and export workflow.

Please report any shortcoming in this documentation and we’ll fix it as soon as possible!

Updated for Sitely 8

Powerful and refreshingly simple, at home on Mac, finding new freedom on iPad.

Product

Documentation

Pricing

What’s new

Download: iPad | Mac

© 2026 Crinon. All rights reserved.

Made with ♥ for iPad and Mac

Close and reject optional cookies

Cookie Bite  Cookie choices

We and our partners use optional cookies for extra features, saved preferences, visit counts and personalised ads. To change your choices later, use Cookie settings in the footer.

Reject all
Accept all

Closing keeps optional cookies off.  Privacy policy