Tag Archives: Wordpress

How to Create Your First WordPress Plugin

Today I just explained the concept a wordpress plugin to one fo my mate @ workplace. So thought of documenting it here for my own reference. Example explained here is different than what i explained to my friend.

A WordPress plugin is simply one or more PHP files that adhere to certain rules and conventions. All you need to understand and complete this post is a basic understanding of PHP programming.

Aim of this post is to explain the concept of creating a Wordpress Plugin i.e. to explain the process for newbies.
Lets create a plugin which simply displays the most commented 5 posts.

Plugin Folder Structure

../wp-cpntent/plugin/your_plugin

Now we will create a folder in Wordpress Plugin directory say “most_commented_post” i.e.

../wp-cpntent/plugin/most_comments_on_post

Activating/Deactivating the Plugin
In order for wordpress to activate/deactivate we need to add PHP comments to main file of the plugin. Means we will create a file named “most_commented_post.php”

../wp-cpntent/plugin/most_comments_on_post/most_commented_post.p Continue reading

Posted in Technology, Wordpress | Tagged , , , , | View Comments