WordPress – How to integrate a plugin or widget into a theme

Generally I create an includes directory within my themes directory and place the plugins (inside their folders) within the includes directory. This way I can control the version of the plugin used. And it also keeps my clients from being tempted to upgrade the plugin (when upgrades are available) and potentially breaking something.

I then identify the main file of the plugin by looking for a file within the plugin with the following info at the top.


Then I use the following line of code to add activate the plugin. I place it in my themes functions.php.


Enjoy…

Leave a Reply

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