Chapter practice task
Task: Customize your theme without losing changes on updates
- Add three small design tweaks with custom CSS.
- Create a child theme for your active theme.
- Move your custom CSS into the child theme’s stylesheet.
- Add a small function to the child theme’s functions.php.
- Update the parent theme and check that your changes are still there.
By the end of this chapter
- You know where to add custom CSS in block and classic themes
- You can create and activate a child theme
- Your customizations survive theme updates
Quick answers for this chapter
Do I need a child theme for small CSS changes?
No. The Additional CSS area is fine for small tweaks. Use a child theme for template or PHP changes.
Can I edit theme files directly?
You can, but updates will erase your changes. That’s what child themes prevent.
Is editing functions.php risky?
A typo can break the site. Edit through File Manager or FTP (not the dashboard editor) and keep a backup.