Develop a Simple WordPress Plugin
If you want to customize 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. Furthermore, if ones need extra functionality he can add PHP module called plugins. Moreover, these plugins are written in PHP. In addition, HTML, JavaScript, JavaQuery, and AJAX you can also incorporate to add more functionality. However, in this article, I will only use an echo command to print a single sentence in PHP. The plugin is 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. Further, 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- To sum up, I have demonstrated that how a very simple plugin you can build 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!