Remove the WordPress Logo From the Admin Bar
add_action( ‘wp_before_admin_bar_render’, function () { global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘wp-logo’ ); }, 0 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action( ‘wp_before_admin_bar_render’, function () { global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘wp-logo’ ); }, 0 );Continue reading
add_action( ‘admin_head’, function () { if ( current_user_can( ‘update_core’ ) ) { return; } remove_action( ‘admin_notices’, ‘update_nag’, 3 ); }, 1 );Continue reading
add_filter( ‘enable_login_autofocus’, ‘__return_false’ );Continue reading
remove_action( ‘after_password_reset’, ‘wp_password_change_notification’ );Continue reading
add_action( ‘enqueue_block_editor_assets’, function () { $script = “jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( ‘core/edit-post’ ).isFeatureActive( ‘fullscreenMode’ ); if ( isFullscreenMode ) { wp.data.dispatch( ‘core/edit-post’ ).toggleFeature( ‘fullscreenMode’ ); } });”; wp_add_inline_script( ‘wp-blocks’, $script ); } );Continue reading
add_filter( ‘manage_upload_columns’, function ( $columns ) { $columns [‘file_size’] = esc_html__( ‘File size’ ); return $columns; } ); add_action( ‘manage_media_custom_column’, function ( $column_name, $media_item ) { if ( ‘file_size’ !== $column_name || ! wp_attachment_is_image( $media_item ) ) { return; }…Continue reading
:root { /* Text Size Scale */ –text-xs: clamp(0.72rem, calc(0.82rem + -0.13vw), 0.79rem); –text-s: clamp(0.89rem, calc(0.88rem + 0.02vw), 0.90rem); –text-m: clamp(1.00rem, calc(0.95rem + 0.23vw), 1.13rem); –text-l: clamp(1.13rem, calc(1.02rem + 0.51vw), 1.41rem); –text-xl: clamp(1.27rem, calc(1.09rem + 0.90vw), 1.76rem); –text-2xl: clamp(1.42rem, calc(1.14rem…Continue reading
/** * Snippet Name: WooCommerce Change “$0.00” to “Free” * Snippet Author: ecommercehints.com */ add_filter( ‘woocommerce_get_price_html’, ‘ecommercehints_change_zero_price_display’, 10, 2 ); function ecommercehints_change_zero_price_display( $price, $product ) { if (empty($product->get_price()) || $product->get_price() == 0) { // If price is not entered or…Continue reading