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
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/mu-plugins of your site depending on the type of WordPress installation (single or multisite) you have.