can anyone help me i am trying to create a plugin for gallery but at the initiating a problem occurred,when i activate the plugin it activating but problem is that it does not appearing at left menu ,
this is my code of plugin startup:|
<?php
/*
Plugin Name:JaissGallery
Plugin URI:WWW.GOOGLE.COM
description: >-Jaiss gallery plugin
Version: 0.1
Author: Mr. Tahrid abbas
Author URI:
*/
function doctors_gallery(){
add_menu_page(
"doctorsGallery",
"Doctors Gallery",
"Manage_options",
"DoctorsGallery",
"Doc_gallery_view"
);
}
add_action('admin_menu','doctors_gallery');
function Doc_gallery_view(){
echo "ghfhgfgh";
}
can somebody tell me please what i am missing there ?
can anyone help me i am trying to create a plugin for gallery but at the initiating a problem occurred,when i activate the plugin it activating but problem is that it does not appearing at left menu ,
this is my code of plugin startup:|
<?php
/*
Plugin Name:JaissGallery
Plugin URI:WWW.GOOGLE.COM
description: >-Jaiss gallery plugin
Version: 0.1
Author: Mr. Tahrid abbas
Author URI: http://mrtotallyawesome
*/
function doctors_gallery(){
add_menu_page(
"doctorsGallery",
"Doctors Gallery",
"Manage_options",
"DoctorsGallery",
"Doc_gallery_view"
);
}
add_action('admin_menu','doctors_gallery');
function Doc_gallery_view(){
echo "ghfhgfgh";
}
can somebody tell me please what i am missing there ?
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";
}
Can you try this,
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_action( 'admin_menu','doctors_gallery' );
function doc_gallery_view(){
echo "ghfhgfgh";
}