Home Blog The WordPress Custom Functions Plugin

The WordPress Custom Functions Plugin


Anybody with a WordPress website should have a custom functions plugin… and operating without one is fraught with potential problems. This post serves as a landing page for our custom functions plugin, but also includes our argument for why it’s required (and why it’s installed on every website we work with). We’ll be referencing this post from other code-focused articles in the future.

The custom functions plugin is designed primarily to support WordPress shortcode. If you don’t know what shortcode is, see this post.

There are a number of problems with using multiple plugins. It’s not uncommon for WordPress users to install a plugin for a particular feature when a single small snippet of code often provides the same functionality — without bloated administration pages and other superfluous code. While plugins are a perfectly acceptable means of providing features – and indeed the WordPress framework takes on a minimalist approach because it has such an active base of plugin developers – having too many plugins can seriously compromise on your website load speed and SEO. While the number of plugins that you should (or shouldn’t) have installed varies from one developer to another, they all tend to agree that “the fewer the better”.

Multiple plugins are expensive – meaning that they compromise on CPU usage and memory every time a page is served. One method of mitigating the need for multiple plugins – particularly when the plugin provides a simple feature – is to simply copy the necessary code into your custom functions plugin. It’s not uncommon for the custom functions plugin to provide a sanctuary for code that would otherwise translate to dozens of plugins.

You shouldn’t ever edit core files. While you can simply copy necessary code from time-to-time into an existing functions.php file associated with your theme ; the problem with this is that when you update your theme you’ll invariably overwrite the custom code you’ve copied. Additionally, you should never edit core WordPress files; there’s always almost always a means of navigating that need with WordPress hooks, actions, and filters – all of which can be coded into your custom file to make your website more modular, extensible, and functional.

The custom functions file is portable. If and when you alter your theme you may simply copy your custom functions plugin from one WordPress installation to another – meaning that the features you’ve coded into your website won’t be interrupted. Additionally, one single change in the functions file will impact all instances of the shortcode on your website (one of the primary benefits). For example, if you have shortcode to display a YouTube video and you have the width set to your post container of 400 pixels… but then you change to a theme with a post container with a width of 600 pixels, changing a single shortcode attribute in your custom code will scale the video globally.

Keeping your custom code in a plugin means all your little custom snippets and functions will never break or be compromised by any kind of upgrade. Best of all, if you decide to start another website, you can simply copy across the plugin and all your custom functions and shortcode will immediately be available.

Title: Custom Functions Plugin
Description: The custom functions file gives you control over shortcodes, hooks, filters, actions, and other WordPress code.
Download: WP Plugin (V0.1) | Plugin Page

Short URL for this post: http://shor.tt/1XMj


  1. I can’t find a Custom Functions Plugin with Belief Media or Martin Khoury as the author. I see other Custom Functions plugins and I want to make sure I get the correct one. I’m trying to embed Voxer voice messages in my wordpress.org blog.

  2. I was able to upload the Custom Functions .zip file and install and activate it. I copied the code to be able to embed Voxer voice messages into my blog, but I can’t figure out where to put the code. I didn’t see any widget to add to a sidebar called Custom Functions. I”m almost there, but I just can’t figure out how to insert the PHP

  3. Hi Martin,

    I have Downloaded your METAR Plugin. Uploaded the Zip File and Activated the Plugin.

    However, All I see is Meta Shortcode in the Left Admin Panel. I cannot find ANY “Custom Functions” Link. I have even looked in the editor eare at the files for my template and there is NO custom-functions.php

    So I am at a loss as to where to place your suggested php code

    NOTE: I currently have another plugin running connecting to NOAA but as you are aware is will only return for eg: YBBN for Brisbane. I was hoping to list all – As in YBBB or YMMM.

    Your help in resolving this would be appreciated.


Please enter your comment!
Please enter your name here