How would I create a plugin for my shortcodes?

Code in functions.php and plugins works in almost exactly same way (except than stage at which it is loaded and some plugin-specific hooks).

Basically you just take your code out of functions.php, place it in plugin and it still works. It is good practice to use naming conventions and checking for functions definitions so it doesn’t explode if you accidentally load both copies.

But there will be no difference in how code actually works.

See Writing a Plugin for a starting point.

Leave a Comment