Friday, October 14, 2011

Hello word plugin wordpress

How to write plugins in word press?
Writing plugins in wordpress is not difficult.I will show you how to write simple plugin in wordpress and we will start with hello word plugin The hello word wordpress plugin illustrate the file structure and the position of wordpress plugins.For every language the hello word program best describe the process of writing the code.




Hello-word.php file code :

< ?
/*
Plugin Name: Hello-World
Plugin URI: http://wp-help.blogspot.com/
Description: A simple hello world wordpress plugin
Version: 1.0
Author: Balakrishnan
Author URI: http://wp-help.blogspot.com/
License: GPL
*/
/* This calls hello_world() function when wordpress initializes.*/

add_action('init','hello_world');
function hello_world()
{
echo "Hello World";
}
?>

Save this file in wordpress > wp-contents>plugins>hello-word.Then go to admin and click on plugins and you will see the plugin hello word there.

2 comments:

  1. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing.
    how to make money

    ReplyDelete