evencloمركز المساعدة

مركز المساعدة / موقع فعاليتك

Custom HTML, CSS and JavaScript

Override a section with your own code when the built-in options genuinely cannot do it.

لم يُترجم هذا الدليل بعد، لذا يظهر بالإنجليزية.

من يمكنه ذلكowneradmin

Each section's Advanced tab takes custom HTML, CSS and JS, and there is a Custom section type for arbitrary markup.

This is the escape hatch, not a starting point. Custom code is not covered by revision history in the way section content is, it can break your layout on mobile, and it will not adapt when you change your theme. Use a built-in section wherever one will do.

Steps

  1. Open Page editor and select the section.
  2. Open the Advanced tab.
  3. Add Override HTML, Custom CSS, Custom JS or a Custom class.
    Page editor advanced tab with the custom HTML, CSS and JS fields
    Page editor advanced tab with the custom HTML, CSS and JS fields
  4. Save code, then check the preview on every device size.

Reasonable uses

Unreasonable uses

If you write custom CSS

If you write custom JS

What happens next

Custom code is part of your draft until you publish. Check every device size and both languages first.

Common problems

The page scrolls sideways on mobile. A fixed width in your CSS. Use percentages or max-width: 100%.

Your CSS restyled other sections. Not scoped. Add a Custom class and target it.

The layout breaks in Arabic. Hard-coded left/right in your CSS.

Your script does nothing. Check the browser console for errors.

An embed does not appear. Many providers block being embedded on other domains. Check with the provider.

You want to undo it. Clear the fields and save. Custom code is not versioned like section content, so keep your own copy of anything substantial.

المزيد في موقع فعاليتك