5. Create admin menu and submenu in wordpress custom plugin

Опубликовано: 02 Июль 2026
на канале: pktechnology
29
0

Creating a WordPress plugin from scratch might seem tough, but it’s an essential skill for customizing and extending the functionality of your WordPress site. This article will walk you through the steps of creating a simple plugin. A WordPress plugin is a piece of software that adds new features or extends the functionality of your WordPress site. Plugins can do anything from adding a contact form to integrating with third-party services.

In WordPress plugin development, you need to use menu functions (add_menu_page, add_submenu_page) along with register_activation_hook to create admin menu and submenu on plugin activation. However, keep in mind that menu functions do not run as soon as the plugin is activated, they have to run when the admin interface is loaded. So, menu creation is done in admin_menu hook, and register_activation_hook is kept for a different purpose (like creating database).
WordPress plugin development में plugin activation पर admin menu और submenu को create करने के लिए आपको register_activation_hook के साथ menu functions (add_menu_page, add_submenu_page) को use करना होगा। हालांकि ध्यान रखें कि menu functions plugin activate होते ही नहीं चलते, इन्हें admin interface के load होने पर चलाना होता है। इसलिए menu creation को admin_menu hook में लिखते हैं, और register_activation_hook को अलग purpose के लिए रखते हैं (जैसे database create करना)।

Create database table during plugin activation,
wp plugin development,
wordpress plugin development,
wordpress plugin development from scratch,
contact form plugin wordpress,
wordpress plugin tutorial,
how to make a wordpress plugin,
how to code a wordpress plugin,
how to setup a wordpress plugin,
simple wordpress plugin,
custom wordpress plugin,
plugin security,
creating wordpress plugin,
create a wordpress plugin,
create a wordpress plugin tutorial,
wordpress plugin
admin menu and submenu,
create admin menu,
create submenu,
menu and submenu,
menu,
submenu,
wordpress plugin admin menu, add admin menu in wordpress plugin, wordpress plugin add submenu, create custom admin menu in wordpress, wordpress plugin development tutorial, wordpress plugin admin page, wordpress add_menu_page, wordpress add_submenu_page, wordpress custom plugin menu, wordpress admin menu hook, create settings menu in wordpress plugin, wordpress admin dashboard menu, wordpress plugin development for beginners,



#hindi #pktechnology #crudoperations #scrap #scrapping #plugindevelopment #wordpress #wordpresstutorial #customplugin #plugins #wordpressplugindevelopment #menu


code: https://pktechnology.co.in/admin-menu-page...