Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change menu items labels in wordpress admin area?

Is there a way to change the labels of the menu items inside the admin area? Like when you register a new custom post type when you can specify every label for it, but for the default menu items.

Thanks in advance!

like image 790
Javier Villanueva Avatar asked Dec 02 '10 21:12

Javier Villanueva


People also ask

How do I add menu items to WordPress admin panel?

Creating menu –add_action('admin_menu', 'custom_menu'); add_action('admin_menu', 'custom_menu'); In above line of code, first parameter is the hook we discuss about, Second parameter is name of callback function. In callback function you have to write what you want to alter in admin menu.

Can I customize WordPress admin panel?

As we discussed in this article, there are four ways you can customize the WordPress admin dashboard: Replace the logo on the login page. Use a custom admin theme to change the styling of the dashboard. Create custom widgets with helpful resources for your clients.

Where is WordPress Admin menu?

You can access the the menu editor by going to Settings -> Menu Editor. The plugin will automatically load your current menu configuration the first time you run it. If you have WordPress set up in Multisite (“Network”) mode, you can also install Admin Menu Editor as a global plugin.


1 Answers

add_filter( 'gettext', 'change_post_to_article' );
add_filter( 'ngettext', 'change_post_to_article' );

function change_post_to_article( $translated ) 
{  
    $translated = str_replace( 'Post', 'Article', $translated );
    $translated = str_replace( 'post', 'article', $translated );
    return $translated;
}

There is another way to do this, for more info check this answer.

like image 197
joeljoeljoel Avatar answered Sep 24 '22 01:09

joeljoeljoel