Creating your first plugin
The process of developing a simple plugin is not complex. It follows the same process we used for themes, where we used PHP header comments. First, you have to create a new directory inside wp-content/plugins
, with a preferred name. In this example, we are going to name it wpquick-after-post-content
. Once the plugin directory has been created, we can create the main plugin file, which is wpquick-after-post-content.php
. You can use the preferred name for the main plugin file. Now, we have to add the following header comments section to define it as a plugin:
<?php /* Plugin Name: WPQAPC After Post Content Plugin URI: http://www.wpexpertdeveloper.com/wpquick-after-post Description: Add dynamic content after the post Version: 1.0 Author: Rakhitha Nimesh Author URI: http://www.wpexpertdeveloper.com */
The plugin definition comment is similar to the theme definition, where Theme Name and Theme URI are being replaced by Plugin Name and Plugin URI. Once the comment has...