How to remove header label in WP dashboard

Hi, how do i remove the label in the upper left hand part of the screen? for example, when i'm on the "profile" page, it says Profile in the upper left corner. See attached. I would like to remove this label from all of the pages, so basically just stop that header from appearing in all cases. thanks very much for your help and support.

  • Ivan Shulev

    Hey Austin ,

    I hope you are having a nice day so far!

    I can provide you with some code to remove the label, but first I would advise you to consider something.

    If you go to WP Admin > Network > Users > All Users you will see the following at the top:

    There are buttons as part of that Label and that is functionality that most WordPress users are used to.

    The buttons can be left alone and only the text removed, but still this is considered "bad user experience practice".

    I am not trying to judge what you want to do. I do not know your reasons and even if I did, it is not my job to say if it is right or wrong. I am just providing my opinion, which you might consider.

    I wish you an awesome day ahead!

    Ivan

  • Ritesh

    Hi Austin

    I hope you are having a good day :slight_smile:

    This can't be possible using CSS but it's possible using JavaScript. Check attached image. As you can see the "Text" don't have any CSS class or something using which we can hide it.

    Using following JS code you can hide the "Text". You need to add the JS code in a JS file which will load in WordPress dashboard only. Check admin_enqueue_scripts hook for that.

    jQuery(document).ready( function( $ ){
    	$('.wrap>h1').html( $('<div>').append( $('.wrap>h1 a').clone() ).html() );
    } );

    Let us know if you need any assistance with this.

    Cheers,
    Ritesh

  • Luís

    Hi Austin ,

    Hope you're doing well today!

    Please, try this procedure:

    1) Using FTP access, go to "wp-content/themes", open the folder of the theme you are using and create a folder called "my-js";

    2) Also, download the functions.php file and using an editor, open it and place this function in the bottom:

    function my_enqueue() {
      wp_enqueue_script( 'my-custom-script', get_template_directory_uri() . '/my-js/myscript.js');
    }
    add_action( 'admin_enqueue_scripts', 'my_enqueue' );

    3) Save the file and upload it.

    4) Download the file attached, unzip it and upload the file "myscript.js" to the "my-js" folder previously created.

    Cheers, Luís

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.