- This topic has 13 replies, 2 voices, and was last updated 9 years, 4 months ago by
Tom.
-
AuthorPosts
-
November 27, 2016 at 9:05 am #248320
albabes
Still recommending Pluginception Tom? 9 months old, and not compat w/ latest WP.
Thanks
November 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
https://generatepress.com/knowledgebase/adding-php-functions/Thanks
November 27, 2016 at 10:06 am #248329Tom
Lead DeveloperLead DeveloperAbsolutely, all it does it creates a new blank plugin for you to add functions to.
November 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 #248362Tom
Lead DeveloperLead DeveloperIf 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 #248413Tom
Lead DeveloperLead DeveloperAhh, 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 #248484Tom
Lead DeveloperLead DeveloperThe 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 #248549Tom
Lead DeveloperLead DeveloperCan’t have a child theme of a child theme.
You’ll need to use a custom plugin or the Code Snippets plugin.
November 29, 2016 at 2:20 pm #249469albabes
Thanks Tom
November 29, 2016 at 9:54 pm #249571Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.