function – Disable Comments Completely

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Empty Admin Dashboard

add_action( ‘wp_dashboard_setup’, function () { global $wp_meta_boxes; $wp_meta_boxes[‘dashboard’] = array(); remove_action( ‘welcome_panel’, ‘wp_welcome_panel’ ); }, 1000 );Continue reading

Disable Site Health

// Remove Tools Submenu Item for Site Health. add_action( ‘admin_menu’, function () { remove_submenu_page( ‘tools.php’, ‘site-health.php’ ); } ); // Prevent direct access to the Site Health page. add_action( ‘current_screen’, function () { $screen = get_current_screen(); if ( ‘site-health’ ===…Continue reading

Dynamic Year Copyright Shortcode

// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed. // This will output © 2023 or the current year automatically. echo “© ” . date( ‘Y’…Continue reading