There are two great methods to add custom functions to your site without customizing parent theme:
Adding them via Child Theme‘s functions.php file or Create a custom functions plugin
In this post I’m showing you the second one, how to create a custom functions plugin in WordPress.
1) Create a file called custom-functions-plugin.php
2) Add the following codes into it:
＜?php /** * Plugin Name: My Custom Functions Plugin * Plugin URI: http://mysite.com * Description: A custom plugin to add custom functions to my site * Author: My Name * Author URI: http://mysite.com * Version: 1.0 */ /* Place custom code below this line. */ /* Place custom code above this line. */
3) Place your codes between this lines.
/* Place custom code below this line. */ &
/* Place custom code above this line. */
4) Now put the file into wp-content/plugins or wp-content/mu-plugins of your site.