📜  wordpress 禁用帖子 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:43.429000             🧑  作者: Mango

代码示例1
// add  this hook into function.php  file it will disable the post menu from 
//Left Sidebar in wp-admin Dashboard

function remove_posts_menu() {
    remove_menu_page('edit.php');
}
add_action('admin_menu', 'remove_posts_menu');