Create a plugin in wordpress
Creating a plugin in wordpress is just like doing your favorite work with lot of fun.
so lets start to create very simple plugin in wordpress.
steps to create the plugin,
1> create a plugin folder.
for ex, my_first_plugin
2> now create a php file in that folder.
for ex, my_first_plugin\first_plugin.php
3> in this file add header which is the most important part in the plugin development.
/*
Plugin Name: plugin name(first plugin)
Plugin URI: shareprogrammingtips.com
Description: this is my first plugin
Author: Arpi Patel
Version: 1.0
Author URI: shareprogrammingtips.com
*/ |
this will create your plugin.But this will do nothing.
so lets add some code in the plugin,
4> in the first_plugin.php file write the code,
function first_plugin_function() { echo 'This is my First plugin.'; } add_action('admin_notices', 'first_plugin_function'); } |
You are done with the plugin code.
5> now zip the plugin folder you have just created and add your new created plugin in the wordpress plugin by plugin’s new plugin option.
after activating the plugin you will have the message in the admin area.
This is very simple plugin.We can expand it up to the extend we want.
Have a fun with the plugin code.
You may like to read this also....
1 Comment to “Create a plugin in wordpress”
Post comment
Search in this website
our sponsors
latest comments
- venkat on C programming interview questions and answers for freshers
- Ankur on How to configure mail from localhost ( wamp ) using PHP?
- ergVFyd on Huffman Encoding Using Linked List with Source Code
- karthick on how can I write applications in C or C++ for Android?
- karthick on how can I write applications in C or C++ for Android?
Find us on Facebook
Top Authors
Find us on stackoverflow
Polls
My Bookmarks
- Audio/video Recorder & player application based on MATLAB
- check dependency of your binary
- defination of all standard c programming language function
- Great Question-Answer on c programming
- know what your c code means
- Limition of c programming language
- List of all version of c programming language
- Online c compiler
- php freelancing work
- some more stuff on C programming language
- Volatile Keyword in Embedded System
- Write Android application in c language
Hi could you tell us what exactly were the steps you have taken to ilsnatl the Like button on your site? Like what plugins you have used? This thing involves certain tasks like getting a key from facebook and using it in the plugin so we need to know what you’ve done before we can troubleshoot. 0Was this answer helpful?