How to Add Custom CSS and JavaScript to a Community Group
You can paste custom CSS or JavaScript into a single community group from Settings > Branding > Advanced Options. Test changes in preview, then turn Live Mode on. Sparkforge does not write or debug custom code.
Custom CSS and JavaScript at the group level lets you adjust how a single Communities group looks and behaves without touching the rest of your account. Paste code, preview safely, then publish to members.
Note: Sparkforge does not write, debug, or maintain custom code. Use these fields if you have someone who can.
Why scope code to one group
- Precise branding: match fonts, spacing, and components to brand guidelines.
- Targeted changes: CSS and JS apply to one group without touching siblings.
- Controlled rollout: Test Preview before Live Mode flips it on for members.
- Better UX: small JS snippets can sharpen navigation or micro-interactions.
- Mobile flexibility: tailor responsive rules for phones and tablets.
Add custom code to a group
- Log into your sub-account.
- Go to Memberships > Communities > Groups.
- Open the group you want to customize.
- Click Settings.
- Open the Branding tab and expand Advanced Options.
- Paste your code into the Custom CSS and Custom JavaScript fields.
- Click Test Preview to review.
- Turn Live Mode on if it looks right. Otherwise tweak and test again.
- Click Save.
Troubleshooting custom code
If the group starts misbehaving after a code change, append ?customCode=false to the community URL and reload. That disables custom code for the current session so you can confirm whether the code is the cause.
Targeting dark mode
Use the .dark class to scope styles to night mode. Sparkforge applies it automatically to the root when night mode is active. Avoid broad selectors like div:nth-of-type(2); they tend to break unrelated parts of the page.
Frequently Asked Questions
Can I quickly disable custom code while troubleshooting?
How do I style dark mode separately from light mode?
Does custom code in one group affect other groups?
Will Sparkforge support help me write or debug the code?
Was this article helpful?
Thanks for the feedback.