[Resolved] Pluginception

Home Forums Support [Resolved] Pluginception

Home Forums Support Pluginception

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #248320
    albabes

    Still recommending Pluginception Tom? 9 months old, and not compat w/ latest WP.

    Thanks

    #248322
    albabes

    I sorta confused as to how this is used to add to the child theme, functions.php?

    #248324
    albabes
    #248329
    Tom
    Lead Developer
    Lead Developer

    Absolutely, all it does it creates a new blank plugin for you to add functions to.

    #248348
    albabes

    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?

    #248362
    Tom
    Lead Developer
    Lead 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 ๐Ÿ™‚

    #248404
    albabes

    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/

    */

    #248413
    Tom
    Lead Developer
    Lead 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.

    #248441
    albabes

    Are you saying that child themes are different on WordPress, versus getting them elsewhere? And where is elsewhere?

    #248484
    Tom
    Lead Developer
    Lead 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.

    #248535
    albabes

    So since I use Exhibit, I should make a child theme of Exhibit?

    #248549
    Tom
    Lead Developer
    Lead Developer

    Can’t have a child theme of a child theme.

    You’ll need to use a custom plugin or the Code Snippets plugin.

    #249469
    albabes

    Thanks Tom

    #249571
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.