Skip to main content

How to Create a WordPress Plugin?

If you want to customise or need to add an extra functionality for your website, you can do this by changing the core of the WordPress, however, if WordPress gets updated your changes will be ineffective. So, to get rid of this problem WordPress introduced modular architecture in which if ones need to extra functionality he can add PHP module called plugins and these plugins are written in PHP . In addition, HTML, JavaScript, JavaQuery and AJAX can also be incorporated to add more functionality , but in this article I will only use an echo command to print a single sentence in  PHP, this plugin will be very simple but at the end you will be able to create your own plugin.
First of all WordPress plugin is a PHP file and this need plugin header in PHP comment which is

____________________________________________
<?php
/*Plugin Name: Simple Plugin
Plugin URI: https://wordpress.org/plugins/simpleplugin/
Description: This is demonstration for simple plugin
Version: 0.1.0
Author: Bindeshwar Kushwaha
Author URI: http://www.bindeshwar.in
Text Domain: simple-plugin
Domain Path:  /languages
*/
echo "This is a Simple  Plugin";
?>
__________________________________________

Save above above code in a simple-plugin.php file and compress the file in the .zip format and this is your plugin. Upload in WordPress if there is no error then you have made it, this is the simplest plugin one can make it, you can say that an empty file.


Conclusion- In this article, i have demonstrated that how a very simple  plugin can be built for WordPress hope it will help to start your plugin writing . You can add more PHP code and see the results.
Grab the’The Bohemian Fairytale Bundle’ includes over 23 graphics packs with over 1700+ elements and 8 fonts families at only $22!

Comments

Popular posts from this blog

Top Browser's Plugins that Every Blogger Should Know

To know statistics of your blog or website or others, it helps to understand the performance and necessary actions to take. Furthermore, to help you there are many plugins are developed. But, many bloggers do not know that there are bundels of free plugins are that can help you to understand your website. Such as, what runs, alexa rank plugin, moz rank  plugin and many more. Im going to some of the important plugins that every bloggers should install.

1- Alexa Traffic Rank and Alexa Rank Plugin - What  happens when you want to know about  alexa rark of websites you are browsing. You open the url "https://www.alexa.com/siteinfo" and put website name. But these plugins show the alexa rank of browsed websites in the right side of address bar and make your life easy.
Link for Alexa Traffic Rank
2- What Runs - This  plugin is very useful when you want to about technologies a website is running. Such as, server information, server side scipting language, client side scripting langua…

Social Media and Submission Directories that Can Help to Grow Your Web Traffic

When your blog or website is new it will not be able to get traffic from search engines. Then you need to use social media and submission directories where you will submit your  articles' link. If somebody clicks on the link your article will open and blog will drive traffic. But some submission directories takes long time to approve and some demands reciprocal links which are backlinks from your blog and most of them charge money. Here, I am going to list some social media website and  submission directories which do not take long time to approve.  You can submit your articles link very easily.

1- www.facebook.com- This will be the first  the first  choice of any blogger to submit post link to drive traffic. Further, there are many pages and groups that are running. You can find of your own category and can submit your blog posts.
2- www.medium.com-  This is a very good plateform where you can submit you posts links and even you can write articles. Making account in Medium is ve…

How to Drive Refferal Traffic from Quora

Quora is a very popular question and answer forum. And you must have noticed that when you type a key word in search engine you get answers from Quora. Furthermore, digital  marketers and bloggers are using Quora to drive traffic to their blogs or websites.

One of the main reasons of poularity of Quora is its simple user iterface and quality of questions and answers. Moreover, you can find answers of basic level to advance even research level of all walks of life.

Here the main point is how to drive traffic from quora, so I will come on point. And I am going to describe the  methods and process to drive traffic.

1- Search Questions Related to Your Blog-  It is very important to find questions relevent to your blog. Further, find the people  who are working on your blog niche. Both the above mentioned steps are important and the help to build your connections.
2-  Answer the Questions with Quality Answers- If  you answer the questions with quality. Your
answers will get more upvotes and…