Do Not use WP theme functions, create WordPress plugin instead!

In today’s video, we will quickly learn how you can use custom codes without using theme functions. For this video, we will use this simple code to create our own plugin instead.

As you know, the codes posted on theme functions will be deleted whenever you update your theme. So the best alternative to theme functions is creating your own simple plugin to use custom codes.

To get started, let me open this with Notepad++ (you can also use Notepad). Basically, it is a very simple file: plugin name (use any name you want), plugin URL, description, author name, version, author URL, and license information. So, this is the very basic setup for a plugin.

Now, right-click and zip this file. Check the link below for the zip file. Anyway, our plugin is ready to use. Now go to Plugins, Add New Plugin, Upload New Plugin, Choose File from Desktop (Custom Plugin), and Install it. Activate the Plugin. So, the plugin has been activated. You can see your Plugin here.

Now, let’s add some Code here. Go to Plugin File Editor, choose the Plugin, and Select. Now you can use this as functions.php by adding your own custom codes.

Please do give it a try! Thank you very much.

Recent blogs