Create a Custom Functions Plugin

There are many occasions you may need to add custom functions to your WordPress site, either required by the theme or plugins you use.

There are two methods to add custom functions to your site without customizing the parent theme, one is adding them via Child Theme‘s functions.php file and the other is creating a custom functions plugin for them.

In this post, I’ll describe the steps to create a custom functions plugin in WordPress.

1) Create a file called custom-functions-plugin.php.

2) Add the following codes to it.

<?php
/**
* Plugin Name: My Custom Functions Plugin
* Plugin URI: https://mrinalroy.com/wordpress/plugins
* Description: A custom plugin to add custom functions to my site
* Author: Mrinal Roy
* Author URI: https://mrinalroy.com
* Version: 1.0
*/

/* Place custom code below this line. */

/* Place custom code above this line. */

3) Now zip the file and install it via WordPress Plugins installer (WP Admin > Plugins > Add New)or put the file into wp-content/plugins or wp-content/mu-plugins of your site depending on the type of WordPress installation (single or multisite) you have.

2 thoughts on “Create a Custom Functions Plugin”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.