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!
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With