- This topic has 13 replies, 2 voices, and was last updated 5 years, 5 months ago by Tom.
November 27, 2016 at 9:05 am #248320albabes
Still recommending Pluginception Tom? 9 months old, and not compat w/ latest WP.
ThanksNovember 27, 2016 at 9:10 am #248322albabes
I sorta confused as to how this is used to add to the child theme, functions.php?November 27, 2016 at 9:25 am #248324albabes
Found the page Tom
ThanksNovember 27, 2016 at 10:06 am #248329TomLead DeveloperLead DeveloperNovember 27, 2016 at 10:37 am #248348albabes
Hey Tom, thanks for answering on Sunday.
Not knowing how plugins work, does your response imply that new plugin data goes on the functions.php file for a child theme?
And if so, what happens when the theme gets an update?November 27, 2016 at 11:14 am #248362TomLead DeveloperLead Developer
If you’re using a child theme, then you can skip creating a plugin and just use the functions.php file.
Creating a blank plugin for your functions and using your child theme functions.php file are the same thing.
Updates won’t touch either of them 🙂November 27, 2016 at 12:53 pm #248404albabes
But but but….
It’s not recommended to add functions to this file, as it will be lost if you ever update this child theme.
Instead, consider adding your function into a plugin using Pluginception: https://wordpress.org/plugins/pluginception/
*/November 27, 2016 at 1:17 pm #248413TomLead DeveloperLead Developer
Ahh, if you’re using one of our WordPress.org hosted child themes, those are updated and changes will be lost.
Instead, use a custom plugin or the Code Snippets plugin.November 27, 2016 at 2:25 pm #248441albabes
Are you saying that child themes are different on WordPress, versus getting them elsewhere? And where is elsewhere?November 27, 2016 at 5:42 pm #248484TomLead DeveloperLead Developer
The GP child themes available on WordPress.org are different in that they receive updates sometimes to fix stuff/add new features.
When themes/plugins are updated, the folder is deleted and the new one uploaded – that’s why people lose their changes.
If you use a blank child theme (https://generatepress.com/forums/topic/how-to-install-a-child-theme/#post-198913) – it won’t ever receive an update, so it’s safe to add your custom functions/styles to.November 27, 2016 at 9:27 pm #248535albabes
So since I use Exhibit, I should make a child theme of Exhibit?November 27, 2016 at 11:13 pm #248549TomLead DeveloperLead DeveloperNovember 29, 2016 at 2:20 pm #249469albabes
Thanks TomNovember 29, 2016 at 9:54 pm #249571
- You must be logged in to reply to this topic.