A simple plugin create as "Hello Howdosolutions!" to all the pages.
We can go on to developing a legitimate plugin that performs a meaningful
function now that we understand how to get a plugin accepted by WordPress.
Having a menu item in the sidebar that leads to a page in the admin console
would be a nice place to start. This helps the WordPress site administrator setup your plugin.
Creating a WordPress Plugin for Admin Dashboard
Create a folder and then put below code on that file as index.php file.
<?php
/*
Plugin Name: Howdosolutions plugin
Description: A test plugin
Author: Howdosolutions
Version: 0.1
*/
add_action('admin_menu', 'test_plugin_setup_menu');
function test_plugin_setup_menu(){
add_menu_page( 'Test Plugin Page', 'Howdosolutions Plugin', 'manage_options', 'test-plugin', 'test_init' );
}
function test_init(){
echo "<h1>Hello Howdosolutions!</h1>";
}
?>
0 Comments