wordpress disable posts
// 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');
Here is what the above code is Doing:
1. The first line of code is a function that removes the Posts menu from the admin menu.
2. The second line of code is an action hook that tells WordPress to execute the function when the admin menu is being built.