• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Blog » Site specific plugin framework now available

Site specific plugin framework now available

Chad Butler · Nov 10, 2019 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

There is now a site-specific plugin framework available for customizing. Get it from Github. 

What is a site specific plugin and why do I need one?

One of the most frequent questions I receive is, “What do I do with this code snippet? Where do I put it?”

The most generic (and not incorrect) answer is, “Your theme’s functions.php file.”

But the problem with putting your custom code (or at least all of it) in your theme functions.php is that if you update your theme, your customizations will be lost.  Yes, you should be using a child theme, but the same can happen there if you’re using a commercial child theme. And of course, if (or when) you change themes, your customizations have to either be moved or lost.

Creating a custom plugin for storing your site’s customizations is a better way from an organizational point of view; and I’ve recommended that before on this site.  This framework takes it a step further and provides you with a framework that will allow you to not only store you custom code snippets, but also load any custom CSS and JavaScript that you might need.

If your custom code is more layout related, perhaps it should still go into your theme functions.php, but anything specific to the plugin would make more sense in the site specific plugin. And of course, you can create as many of these as are necessary if you have a lot of custom code and want to keep it organized by plugin (this is not something specific to only WP-Members – this is for any plugin and/or WordPress itself).

How do I use it?

It’s pretty simple to set up, actually.  Here’s how to do it locally:

  • Get the framework and save it locally.
  • Open the file /custom/functions.php and add your custom code snippet.
  • FTP the files to your site.
  • Activate the plugin.

Here’s another approach, using the WP file editor:

  • Download the zip from Github.
  • Upload it through the the WP plugin uploader (Plugins > Add New, click “Upload”).
  • Activate the plugin.
  • Open the plugin in Plugins > Plugin Editor.
  • Select the /custom/functions.php file and add your code snippet.

The process of adding custom CSS or custom JavaScript is similar; just use the appropriate file – .css or .js.

If you break something, simply deactivate (or delete) the plugin.

Blog, Release Announcements

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy