Admin 404 Log

// Admin 404 Log / Kiri Vadivelu / 2026 // Add admin menu function add_404_log_menu() { add_menu_page( ‘404 Error Log’, ‘404 Log’, ‘manage_options’, ‘404-log’, ‘render_404_log_page’, ‘dashicons-megaphone’, 80 ); } add_action( ‘admin_menu’, ‘add_404_log_menu’ ); // Render the page function render_404_log_page() {…Continue reading

Admin Debug Log

// Admin Debug Log / Kiri Vadivelu / 2026 // Ensure debug mode enabled at wp-config // if ( ! defined( ‘WP_DEBUG’ ) ) define( ‘WP_DEBUG’, true ); // if ( ! defined( ‘WP_DEBUG_DISPLAY’ ) ) define( ‘WP_DEBUG_DISPLAY’, false );…Continue reading

Completely Disable Comments

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

Remove users from WP-JSON

add_filter(‘rest_endpoints’, function( $endpoints ) { if ( isset( $endpoints[‘/wp/v2/users’] ) ) { unset( $endpoints[‘/wp/v2/users’] ); } if ( isset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ) ) { unset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ); } return $endpoints; });Continue reading

Scroll Progress Bar

add_action(‘wp_body_open’, function() { echo ‘ ‘; }); add_action(‘wp_head’, function() { echo ‘ ‘; }); add_action(‘wp_footer’, function() { echo ‘‘; });Continue reading