This blog is dedicated for wordpress beginner. I am trying to write this blog with ease so that even if you are new for wordpress you can create wordpress hello word plugin tutorial. Lets move on the topic on how to create hello word wordpress plugin, follow the quick and easy steps mentioned bellow. Presuming that the you have already installed wordpress on your machine.
3 easy steps to create helloworld module in wordpress.
Step 1: Create folder inside the plugin folder.
Go to the plugins folder and create folder “helloworld”.
wordpresswp-contentpluginshelloworld
Step 2: Now create new php file inside helloworld folder and name it to “helloword.php”. copy the source code mentioned bellow to the file. change the
view plaincopy to clipboardprint?
- /*
- Plugin Name: Hello World
- Plugin URI: http://www.phptechi.com
- Description: A simple Hello Word Plugin
- Version: 0.1
- Author: Sunil Rajput
- Author URI: http://www.phptechi.com
- */
- function hello_world() {
- 10. Print(“Hello World Test message.”);
11. }
Step 3: Now go to the wordpress admin panel > plugins and click on “activate” like of helloworld plugin. Now go to the current theme index.php, edit it and add following code just bellow the “get_header” function.
view plaincopy to clipboardprint?
- if(function_exists(“hello_world”)) {
- hello_world();
- }
now refresh your home page. It will show the message on your home page just bellow the header section.
Share this nice post: