Automate the Creation of a WordPress Functionality Plugin

Automate the Creation of a WordPress Functionality Plugin

How many times have you seen a WordPress tutorial where you’re instructed to add a snippet of code to your functions.php file in order to add new functionality to your site? I’m sure we’re guilty of a few. The best practice is to create your own functionality plugin, instead of loading up your functions.php file with a ton of code.

One of the most important reasons for not doing this is to help you during upgrades and troubleshooting. If your site’s functions are broken up into a separate plugin, it will be easier to turn it on or off while trying to track down a problem or incompatibility. It’s much more difficult if all of those functions are loaded via your theme’s functions.php.

That’s where the new Functionality plugin can make your life easier. It automates the creation of a separate functionality plugin for code that you might normally add into functions.php. It gives you an easy way to keep all of those functions separate.

Quick access to your new functions file is available via the ‘Edit Functions’ menu

Install and activate the plugin and you’ll see a new Edit Functions menu item under the plugins menu. Now you can use the built-in WordPress file editor to quickly edit your functionality plugin.

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

Advantages of Using the Functionality Plugin:

<ul

  • Makes it easier to troubleshoot a site without having to turn off your theme
  • Your functions are not tied to your theme, so they will not be affected by theme upgrades
  • Your functions are not affected or deactivated when you switch themes because they are separate from your theme

The bottom line is that it just doesn’t make sense to throw a bunch of extra code into your WordPress theme. Keeping those separate will make site maintenance and updates easier in the long run.

If you like to add custom code snippets to WordPress, this may become a plugin you end up installing on all of your sites. Download Functionality for free from WordPress.org.

Tags: