Change Login Appearance
function custom_login_background() { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function custom_login_background() { ?>Continue reading
function custom_login_logo() { // Replace with your actual logo URL $logo_url = ‘https://yourdomain.com/path-to-your-logo.png’; // Replace with your actual site URL $site_url = home_url(); echo ‘ ‘; } add_action( ‘login_enqueue_scripts’, ‘custom_login_logo’ ); function custom_login_logo_url() { return home_url(); // Replace with custom…Continue reading
add_action(‘login_head’, ‘remove_remember_me’); function remove_remember_me() { echo ‘ ‘; }Continue reading
// Disable Password Reset Functionality function disable_password_reset() { return false; } add_filter(‘allow_password_reset’, ‘disable_password_reset’); // Remove “Lost Your Password?” Link function remove_lostpassword_text($text) { if ($text == ‘Lost your password?’) { $text = ”; } return $text; } add_filter(‘gettext’, ‘remove_lostpassword_text’); // Block…Continue reading
function restrict_dashboard_access() { // Allow AJAX requests to proceed if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) { return; } // Check if user is not an administrator if ( ! current_user_can( ‘administrator’ ) && is_admin() ) { wp_redirect( home_url()…Continue reading
// 1. Add the ID column after the Username column function add_user_id_column($columns) { $new_columns = array(); foreach ($columns as $key => $value) { $new_columns[$key] = $value; // Insert ‘user_id’ column right after ‘username’ if ($key === ‘username’) { $new_columns[‘user_id’] =…Continue reading
// 1. Add Columns to Media Library function add_media_library_columns( $columns ) { $columns[‘media_format’] = ‘Format’; $columns[‘dimensions’] = ‘Dimensions’; $columns[‘file_size’] = ‘File Size’; return $columns; } add_filter( ‘manage_media_columns’, ‘add_media_library_columns’ ); // 2. Display Data in Columns function display_media_library_column_data( $column_name, $post_id )…Continue reading
add_filter(‘manage_posts_columns’, ‘reorder_admin_columns’); function reorder_admin_columns($columns) { $n_columns = array(); $move = ‘author’; // Column to move $before = ‘title’; // Move before this column foreach($columns as $key => $value) { if ($key == $before) { $n_columns[$move] = $move; } $n_columns[$key] =…Continue reading
class Protected_User { // Select capabilities from the default ‘Administrator’ role public function __construct() { add_filter(‘editable_roles’, array($this, ‘filter_editable_roles’)); add_filter(‘map_meta_cap’, array($this, ‘filter_map_meta_cap’), 10, 4); } // Remove ‘Administrator’ role if the current user is not a protected user public function filter_editable_roles($roles)…Continue reading
/** * Shane Cakes – Complete WooCommerce Account Dashboard (With Animated Delivery Bike Tracking) */ // 1. Keep default menu structure intact add_filter( ‘woocommerce_account_menu_items’, ‘shane_custom_my_account_menu_order’ ); function shane_custom_my_account_menu_order( $menu_links ) { return $menu_links; } // 2. Hook directly…Continue reading