Reputation: 694
I need to change "Dashboard" text in wordpress admin section. Any idea how I can accomplish this?
Upvotes: 2
Views: 3800
Reputation: 21
Wordpress give Us possibility to change text by editing translation file. In my opinion it's cleaner way
Upvotes: 2
Reputation: 694
Okay I've found a solution and it's working fine :)
function my_custom_dashboard_name(){
if ( $GLOBALS['title'] != 'Dashboard' ){
return;
}
$GLOBALS['title'] = __( 'Your new Title' );
}
add_action( 'admin_head', 'my_custom_dashboard_name' );
So this is pretty cool huh! GLOBAL['title']
returns page title and you can easily override that.
Upvotes: 5
Reputation: 27092
Your best bet is to use JavaScript or jQuery via a custom plugin (or your theme's functions.php), since these things are hard-coded into the WordPress core. The following targets the Dashboard title itself:
(function($) {
$('#wpbody-content .wrap h2:eq(0)').html('NEW TITLE HERE');
})(jQuery);
Upvotes: 0