The Customization Dilemma
You want your store to be unique, but you also want to receive theme updates. How do you customize without losing your changes on the next update?
This guide shows you the safe way to customize FosThemes.
Understanding Theme Structure
- FosThemes use a layered approach:
- Core styles - Base theme CSS (don't modify)
- Theme options - Customizable via dashboard
- Custom CSS - Your additions (safe zone)
Safe Customization Methods
Method 1: Theme Options Panel
- Always start here. Most customizations can be done without code:
- Colors (primary, secondary, accent)
- Fonts (headings, body)
- Logo and branding
- Layout options
- Component visibility
This is update-safe — settings are stored separately from theme files.
Method 2: Custom CSS Section
For style changes beyond theme options, use the Custom CSS area:
/* Custom CSS - This is preserved during updates */
/* Change button hover color */
.btn-primary:hover {
background-color: #your-color;
}
/* Increase product card padding */
.product-card {
padding: 2rem;
}
/* Custom font for headings */
h1, h2, h3 {
font-family: 'Your Font', sans-serif;
}
Method 3: Custom JavaScript
For behavioral changes, use the Custom JS area:
// Custom JS - This is preserved during updates
// Add custom analytics event
document.querySelectorAll('.add-to-cart').forEach(btn => {
btn.addEventListener('click', () => {
// Your tracking code
});
});
Things to Avoid
DON'T Modify Core Files
Never edit the main theme files directly:These will be overwritten on updates.
DON'T Use !important Excessively
While sometimes necessary, overusing !important creates maintenance headaches:/* Bad */
.button {
color: red !important;
background: blue !important;
padding: 10px !important;
}
/* Better - More specific selector */
.store-page .product-section .button {
color: red;
background: blue;
padding: 10px;
}
DON'T Hardcode Colors
Use CSS variables when possible:/* Bad */
.custom-element {
background: #8b5cf6;
}
/* Better */
.custom-element {
background: var(--accent-color);
}
Advanced Customizations
Adding Custom Sections
For major additions, create new elements rather than modifying existing ones:
/* Create a custom announcement bar */
.custom-announcement {
background: var(--accent-color);
color: white;
text-align: center;
padding: 0.5rem;
}
Responsive Customizations
Always consider mobile:
/* Desktop styles */
.custom-element {
font-size: 2rem;
}
/* Mobile styles */
@media (max-width: 768px) {
.custom-element {
font-size: 1.5rem;
}
}
Backup Best Practices
Before Updates
After Updates
When to Contact Support
- Some customizations require core changes. Contact us for:
- New component requests
- Layout structure changes
- Integration with external services
- Custom functionality
We can often add features to the core theme, benefiting all users.
Conclusion
The key to successful customization is working with the theme, not against it. Use the provided customization hooks, keep your changes organized, and document what you've modified.
Need help with a specific customization? Join our Discord community where developers share tips and solutions.