Ok so lets get started. create a file with your text editor. Add the following text to the very top of the file.
Plugin Name: Author Plug
Plugin URI: http://MyBlogIt.net/plugins
Description: Displays a short bio and image for each author above or below each post.
Author: David Span
Author URI: http://davidspan.com/
What we have just done is add our plugin’s header to the file. This information will be displayed within the plugin page of WordPress. Now save this file to your plugin directory with the name author_plug.php.
Congratulations, you have just created your first working plugin. If you go to your plugin page within your WordPress dashboard you can activate it.
Of course it does nothing at this point you can leave it active as you work on it. With what we are going to be doing it will not harm your WordPress installation.
If your plugin requires other files you can include them in the plugin directory as well. Just do not include the header within them. You can also put your plugin in it’s own subdirectory as well. As long as your main plugin file has the plugin header WordPress will find it.
Whenever your working with php it’s a good idea to have no white space before your open php tag. Doing so can cause php header errors.