WordPress Plugin Development tutorial from scratch (Part 4) WordPress Submenus of Plugin Menu

In this video session i have explained about:

#WordpressTutorialsPoint
#WordpressLearnersHub
#WordpressCustomizations
#LearnWordpressStepbyStep
#WordpressBySanjay

1. How can we made submenus of menu in WordPress Custom Plugin?
===============
Usually, plugin and theme authors need to provide access to a settings (options) screen so users can customize how the plugin or theme is used. The best way to present the user with such a screen is to create an administration menu item that allows the user to access that settings screen from all the Administration Screens.
To make submenu all we need use add_submenu_page function which takes some parameter and also the link of parent item where we are going to attach this.

To add an administration menu:
===============
Please Watch for help:

We have use Action hook for admin menu and use a function as ‘add_menu_page’:
===============
add_submenu_page( string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = ” )
Documentation ref: https://developer.wordpress.org/reference/functions/add_submenu_page/

Some code section from Previous video is here to make you understand about proper structure of Adding Menus to plugin
===============
/** Step 2 (from text above). */
add_action( ‘admin_menu’, ‘my_plugin_menu’ );

/** Step 1. */
function my_plugin_menu() {
add_options_page( ‘Custom Plugin’, ‘Custom Plugin’, ‘manage_options’, ‘custom-plugin’, ‘custom_plugin_callback_function’ );
}

/** Step 3. */
function custom_plugin_callback_function() {
// include your php file here to show the contents to the user
}

SOCIAL :
===============
Subscribe : https://www.youtube.com/channel/UCB2flCo-gW6RhpVVXySqcMg
FACEBOOK : https://www.facebook.com/onlinewebtutorhub/
TWITTER: https://twitter.com/owthub
BLOG: https://onlinewebtutorhub.blogspot.in/

RECOMMENDATION:
===============
1. Some knowledge of PHP, HTML for this video series
2. How to Install WordPress: https://www.youtube.com/watch?v=MREgql9jmf0
3. Menus in wordpress plugin: https://www.youtube.com/watch?v=vpksyjXRcyE&list=PLT9miexWCpPUQkQwL-COHmo0Jd0qxLjTn&index=3
4. add_submenu_page() of wordpress: https://developer.wordpress.org/reference/functions/add_submenu_page/

Also you can learn WordPress Custom
===============
Theme Development: https://www.youtube.com/watch?v=MREgql9jmf0&list=PLT9miexWCpPV9WxY_QG3qxUGKzw54LboW
Widget Development: https://www.youtube.com/watch?v=ZSbdYG1svV8&list=PLT9miexWCpPUgibUXDZ7JP1j3U-m61U8m

Tags
===============
online web tutor,
profotech solutions,
wordpress plugin development from scratch in hindi,
wordpress plugin development from scratch in easy steps,
wordpress plugin development,
wordpress plugin development in easy steps,
plugin development in wordpress from scratch in hindi,
plugin development in wordpress by online web tutor,
plugin development in wordpress tutorials from scratch in hindi,
plugin theme development tutorials in hindi,
plugin development tutorials in hindi,
owt tuts,
wordpress customizations,
wordpress customisations,

Thanks
Online Web Tutor
Keep learning and Sharing 🙂

-~-~~-~~~-~~-~-
Please watch: “Learn backbone.js tutorial from scratch”

-~-~~-~~~-~~-~-

About admin

Leave a Reply

Your email address will not be published. Required fields are marked *