Home / Admin / Disable Posts Post Type
Duplicate Snippet

Embed Snippet on Your Site

Disable Posts Post Type

This snippet hides the default Posts post type from the WordPress admin

<10
Code Preview
php
<?php
// Remove side menu
add_action( 'admin_menu', function () {
	remove_menu_page( 'edit.php' );
} );
// Remove +New post in top Admin Menu Bar
add_action( 'admin_bar_menu', function ( $wp_admin_bar ) {
	$wp_admin_bar->remove_node( 'new-post' );
}, 999 );
// Remove Quick Draft Dashboard Widget
add_action( 'wp_dashboard_setup', function () {
	remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
}, 999 );

Comments

Add a Comment