Here I am going to create a very small plugins, mainly a shortcode which will be used in any page and post and that will show the message “My First Attempt of creating plugin”.


Steps:
- create a folder named “test-plugin” inside plugins folder
- create a php file named “test-plugin.php” inside that “test-plugin” folder
- in that test-plugin.php put this code
<?php
/*
Plugin Name: Test Plugin
Plugin URI: https://facebook.com
Author: Maya Nova
Author URI: https://google.com
Description: This is a test plugin
*/
function test_plugin_function(){
ob_start();
return "My First Attempt of creating plugin";
ob_get_clean();
}
add_shortcode("test_plugin", "test_plugin_function");
Output

