- Trang khách hàng
- Câu hỏi thường gặp
- Sử dụng Wordpress
- Hướng dẫn xóa bớt các Menu Item trong Wp-admin của wordpress

Thư mục
Thư mục
Hướng dẫn xóa bớt các Menu Item trong Wp-admin của wordpress
Bạn có thể sử dụng đoạn code sau để vào trong tập tin function.php của theme:
add_action( 'admin_menu', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
remove_menu_page('profile.php');
remove_menu_page('index.php');
}
function remove_menus () {
global $menu;
$restricted = array(__('Links'));
end ($menu);
while (prev($menu)){
$value = explode(' ',$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
}
}
add_action('admin_menu', 'remove_menus');
Trong đó bạn hãy thay lại dòng:
remove_menu_page('profile.php');
remove_menu_page('index.php');
Thành link menu bạn muốn bỏ và thử reload lại nhé.
Câu trả lời này hữu ích?
Bài viết liên quan


Nếu title trong wordpress không hiển thị, các bạn thử mở tập tin header.php trong theme và sửa...

Nếu bạn cài đặt SSL cho site wordpress, sau đó bị lỗi redirect loop Bạn hãy làm cách sau để...

Để khắc phục lỗi thiếu mất admin bar trong wordpress, các bạn có thể làm như sau: Bước 1: truy...

Lỗi này do phiên bản php trên máy chủ của bạn cao hơn phiên bản của mã nguồn wordpress. Vì vậy...
Powered by WHMCompleteSolution