Getting Started with WordPress Plugin Development
Beginner guide to creating your first WordPress plugin with automatic image injection for posts.
Writing plugins for Wordpress may seem like a daunting task if you’re new to Wordpress. But all it takes is a good starting point to get the ball rolling. Today I’ll show you how to get started with your first simple Wordpress plugin. For this example, we will be making a plugin that automatically adds an image to all new posts.
First, you will need to make the appropriate directories and files. In your/wp-content/plugins/directory, make a new folder with your desired plugin name, and a .php file with the same name.
You should have a structure similar to this:/wp-content/plugins/auto-image/auto-image.phpmaking sure that whatever name you chose, you use it for both the file and directory.
Open up the .php with your favorite editor and add some basic plugin info into the file header: