0

What is the best approach to changing admin menu labels? As part of my first step in modifying the admin area, I would like to know how I can change WooCommerce label to Shop?

1

In order to change the menu labels you will have to go to add this code into your functions.php:

add_filter( 'gettext', 'change_woocommerce_text' );

function change_woocommerce_text( $translated ) 
{  
    $translated = str_replace( 'WooCommerce', 'Store', $translated );
    return $translated;
}

Tested.

  • Thank you for the code, I've copied your code into my functions.php and it seem that the label have not change. Is the code you given was not tested? – William Jerome Jul 14 '18 at 4:18
  • It's tested, I just updated my answer with and screen shoot. Try to add that code at the bottom of the fuctions.php file. – Castiblanco Jul 14 '18 at 4:22
2

You can try this. (Exp: I have changed label 'Post' to 'Articles')

add_action( 'admin_menu', 'custom_change_admin_label', 99);
function custom_change_admin_label() {
    global $menu;
    //global $submenu;
    $menu[5][0] = 'Articles';
}

Screenshot: http://nimb.ws/jiIC91

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.