For Menu and Submenu,
function doctors_gallery(){
add_menu_page(
__( 'Doctors Gallery', 'textdomain' ),
'Doctors Gallery',
'manage_options', // The capability required for this menu to be displayed to the user.
'DoctorsGallery',
'doc_gallery_view'
);
add_submenu_page(
'DoctorsGallery',
__( 'Doctors Submenu Page', 'textdomain' ),
__( 'Doctors Submenu', 'textdomain' ),
'manage_options',
'DoctorsSubGallery',
'doctor_submenu_callback'
);
}
add_action( 'admin_menu','doctors_gallery' );
function doc_gallery_view(){
echo "ghfhgfgh";
}
function doctor_submenu_callback(){
echo "Sub Menu section";
}
Related Posts:
- Better ads plugin has 500.000 entries in wp_postmeta
- PHP Fatal error: Call to a member function locale() on a non-object
- Render Modula Plugin Shortcode On Ajax Request
- WordPress error: Options page Setting_ not found in the allowed options list
- Shortcode Placeholder Plugin
- This WordPress plugin isn’t creating links correctly
- Basics of changing plugin output
- WordPress plugin url for form submit
- how to place a link on the first post only using a plugin
- Minimizing scripts & css files that plugins add
- How to setup a product that has multiple price options? [closed]
- flush_rewrite_rules() not working with update_option_{$option}
- correctness of URL
- How to ignore extra whitespaces in translation functions like _e?
- Override plugin template
- Price comparison table based on Custom Post Type?
- WordPress Update Question
- The “Child Pages Shortcode” plugin, block template
- How do I determine if the user who registered is not spam?
- “After file loaded” action
- Add_image_size not generating correct size
- navigation among single posts
- Is there a way to insert multiple images into a post at the same time without using a gallery?
- How to get a custom page through plugin?
- Filters on the_content with plugins, pages and shortcode
- Plugin to send messages to members/lists but not full-blown newsletters
- Show Homepage (only) Hits Count
- Plugin access and Roles
- How to create a plugin page that shows XML?
- Plugin prevents code from working
- How to make WooCommerce payment method field optional?
- can’t install any wp plugins [duplicate]
- WordPress jQuery Post – Amending Variable Value Within Function Command
- Custom Post Type same name as Category
- how to display recent post by category on home page
- Add Plugin broken after removing Booster for Woocommerce
- WP_CONTENT_DIR disables plugin directory
- how to define a html folder to make it work with WordPress commands
- How to display the custom post related blog by category?
- Overriding inline !important CSS with Javscript code snippet with media query
- WP Forms not displaying,becomming an fatal error
- Undefined index: custom_post_template_present
- Ensure WordPress Theme Uninstalls Completely
- Asking help regarding potential malware
- Image path in childs theme
- How to find where an image is used by it’s url
- checkout stripe with plugin contact form
- Disqus comment system not show
- Accessing data from Google Cloud Datastore in WordPress site
- Login issue in WordPress
- Mobile and Tablet responsive in Elementor but not on the actual site?
- WordPress backend post update without refresh
- Warning: sprintf(): Too few arguments in nav-menu-template.php
- Swap themes locally
- Different function call depending on shortcode?
- How to execute certain code on back-end button press?
- Make another copy of a plugin and install it
- How to add add blank non-editable wp page like default blog for use with plugin
- How do I override WordPress plugin css [closed]
- How To Add Code To WP Without Plugin or Functions
- Creating Nested custom fields
- In the WordPress API is there a way to set the width of the post/page container
- Home page letters
- Multiple calling javascript from shortcode in one page
- Run one-time script calling plugin functions
- Adding icons next to categories in wp_nav_menu
- Is there a function to search for a wildcard value when calling a shortcode?
- Plugin does not create a custom table upon activation
- Automatic updates of plugins and themes outside of wordpress.org
- Custom plugin breaks css.php on Multisite
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- admin panel save option with ajax
- Woocommerce Subscriptions – Customer change subscribed product after placed
- How to Change MU/BuddyPress Group Blog New Installation Defaults [closed]
- Retrieving old forms in Contact Form 7 [closed]
- Link Forms on WordPress
- Advice on setting up private site
- is ther a plugin that will hide/show content for a scheduled period of time? [closed]
- update_post_meta not working
- Pulling Advanced Custom Fields from other pages
- WordPress plugin WP-blocks is adding slashes before apostrophe
- Trying to use Advanced Custom Fields with custom image sizes
- Adding Category in URL in some post
- Why does theme need woocommerce to show images / content on front page?
- Manage Inventory Without Displaying Levels
- registration plugin [closed]
- Which action/filter can i use for a Member Plugin [closed]
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- wordpress Ajax success doesn’t return the value
- add_meta_box showing blank screen in my page
- Option value not getting updated until page refresh in WordPress
- How to create an Info Box on WordPress [closed]
- Fatal error: Uncaught Error: Call to a member function fetch_array() on bool
- Plugin translations are not loaded from translate.wordpress.org
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class
- Add new Plugin or Delete option Not Showing and Also Theme delete option not showing
- Trying to Make a Sidebar/Tab on Specific Posts
- WordPress “wp cron event run” as Siteground cron job
