Create a Plugin File

The first step in creating a WordPress plugin is to create a new PHP file for your plugin code. The plugin filename should be descriptive of your plugin so it's easy to identify your plugin in the plugins directory. It should also be unique because all WordPress plugins exist in the same folder. If your plugin filename is too generic you run the risk of another plugin having the same filename, which would be an obvious problem.

A plugin can also exist in a folder containing all of the necessary files the plugin needs to run. A folder should always be used if your plugin requires more than one file because it helps keep the user's plugin folder organized. It's also a good idea to create an /images folder inside your plugin folder to store any custom images your plugin might use, such as a custom menu icon.

Was this article helpful?

0 0
Newbies Guide To Online Hobby Profits

Newbies Guide To Online Hobby Profits

Many people are passionate about their hobbies. They make time in their lives for them, spend lot of money on them, and even sometimes move their homes, families and jobs just to be closer to their hobbies. But even if you just enjoy your hobby and perhaps wouldn't class yourself as a fanatic, wouldn't it be great if you could earn money online possibly even a full-time income, from simply telling others people about your passion?

Get My Free Ebook


Post a comment