admin管理员组文章数量:1130349
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 ?
Share Improve this question asked Dec 29, 2018 at 19:33 TahridabbasTahridabbas 831 silver badge6 bronze badges 1- Maybe another read of the Codex explanation and take a good look at the examples. Be aware that using caps on the wrong places is a no go- also. – Charles Commented Dec 29, 2018 at 19:56
2 Answers
Reset to default 0For 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";
}
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 ?
Share Improve this question asked Dec 29, 2018 at 19:33 TahridabbasTahridabbas 831 silver badge6 bronze badges 1- Maybe another read of the Codex explanation and take a good look at the examples. Be aware that using caps on the wrong places is a no go- also. – Charles Commented Dec 29, 2018 at 19:56
2 Answers
Reset to default 0For 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";
}
本文标签: Why activated plugin does not appearing in left side menu bar of WordPress admin area
版权声明:本文标题:Why activated plugin does not appearing in left side menu bar of WordPress admin area? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749058734a2309765.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论