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!

Popular posts from this blog

What Are Growth Hacking Strategies?

Growth hacking refers to grab the user base by continuous experiment on all available marketing channels and products to rapid improvement of a business.
From above definition, it  is difficult to distinguish growth hacking from marketing strategy, giving examples  is better way to understand what is growth hacking.
Best examples of growth hacking.
1- Drop box- Drop box is considered to be one of the best examples of growth hacking, strategy of  drop box that a user want to increase its file storage size
drop box provides two options invite your friends or purchase storage, further human basic nature is that they like free things so users invite their friends and later some of them purchase too,  so here drop box spreading its business without spending a dollar  and also growing business.




2- Reliance Jio Infocomm Limited (Jio)- This is ever great example in cellular service sector that reliance grab millions of users in 3 months after providing 3 moths free services it made a huge user …

5 Growth Hacking Srategies In Blogging

In my previous article on growth hacking  What Are Growth Hacking Strategies? .  I presented some case studies that how some online businesses grew without spending millions of dollars on advertising, this growth hacking strategies can also be applied for blogging to increase visitors on the blog, further, in simple words growth hacking  is a rapid experiments  to apply all the tactics and appropriate technologies to   increase audiences. In blogging, growth hacking strategy can also be applied, here I will present some tactics that bloggers are applying before growth hacking word was formulated and some are need to be applied.

1. Do experiment on your content- In most  cases, users like simple sentences, but if you introduce few difficult words readers my welcome, some quotes that matches with your article can grab the attention of users. Further, it is fact  that 70% of word in English  are of French origin, you can introduce some French words and french speaking countries, like Fr…

Plagiarism in Blogging is Serious : How to Detect and Avoid

Most of the bloggers focus on SEO (Search Engine Optimisation), bounce rate, web traffic, clicks, page RPM, impression RPM, theme of the blog, plug-ins and finally total earnings, further, these are important parameters, however, knowingly or unknowingly they do not care about plagiarism which is very serious and can destroy blogging carrier. It happens with newbie they copy and post others articles and think that nobody is noticing, on the other hand, matured blogger can also make mistake and their article may be plagiarised.
To avoid plagiarism, both should use plagiarism detection softwares.
Moreover, there are several tools available to avoid plagiarism. In this article, first, I will describe what is plagiarism, second, types of plagiarism, third, how to avoid it ?
What is plagiarism ?
First Definition " Plagiarism is the act of taking another person's writing, conversation, song, or even idea and passing it off as your own [1]".
Second Definition " To …