Community Forums › Forums › Archived Forums › Design Tips and Tricks › What is the best way to customize functions.php & style.css?
- This topic has 5 replies, 4 voices, and was last updated 8 years, 6 months ago by
Canonical.
-
AuthorPosts
-
August 23, 2016 at 9:03 am #191897
Canonical
MemberI've just started messing around with Genesis because I've heard great things over the years, but I'm having trouble coming up with a good way of implementing changes to function.php and style.css such that... if I ever upgrade a child theme, my changes are not overwritten. Modifying the child theme's functions.php and style.css directly seems to be a bad approach as I'm assuming the developers of the child themes (whether StudioPress or a 3rd party) might occasionally publish updates to those child themes which would then overwrite my customizations. It's similar to tweaking WP core files to customize a site rather than tweaking the theme, just on a smaller scale.
With Thesis, every theme/child theme has a wp-content/themes/<theme-name>/custom/ folder. You make modifications to the theme in this wp-content/themes/<theme-name>/custom/ folder. It contains its own blank style.css, function.php, etc. files. Any changes made to customize the theme are made to those files in the wp-content/themes/<theme-name>/custom/ folder which get applied AFTER the corresponding file from the theme itself is loaded. For example, CSS changes are made to wp-content/themes/<theme-name>/custom/style.css. Then once the theme's own wp-content/themes/<theme-name>/style.css is loaded, it loads the wp-content/themes/<theme-name>/custom/style.css which would contain the overrides needed for the customizations.
The advantage to this is that when the theme/child theme is updated, the files in the wp-content/themes/<theme-name>/custom/ folder are never overwritten, so you do not have to re-implement all of the changes you previously made to the theme/child theme to customize it. They are already there after the upgrade.
Is there any such functionality in Genesis or a plugin from a "reputable" developer that provides equivalent functionality?
August 23, 2016 at 9:15 am #191898Genesis Developer
MemberUse wpclips.net or custom plugin.
August 23, 2016 at 9:16 am #191899Genesis Developer
MemberHave another good plugin https://wordpress.org/plugins/genesis-style-trump/ for stylesheet only,
August 23, 2016 at 10:20 am #191909Brad Dalton
ParticipantAugust 24, 2016 at 1:26 pm #191967Andrea Rennick
MemberChild themes in WordPress are designed to never send out upgrade notices.
Only Genesis gets upgraded.
**forum signature**
If you need technical support for your theme please file a ticket.The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.
August 24, 2016 at 1:30 pm #191970Canonical
MemberAhhh. Finally, something that puts my mind at ease about updating child theme files. LOL
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.