Are you looking for a way to remove current theme from “Right Now” dashboard widget? While there’s probably a plugin for this, we have created a quick code snippet that you can use to remove current theme from “Right Now” dashboard widget in WordPress.
Instructions:
All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:
add_filter( 'ngettext', 'wps_remove_theme_name' ); if(!function_exists('wps_remove_theme_name')) { function wps_remove_theme_name($translated) { $translated = str_ireplace('Theme <span class="b">%1$s</span> with', '', $translated ); return $translated; } }
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly add code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: 9 best WordPress events plugins and how to create a custom user registration form in WordPress.
Seeing it’s now the ‘At A Glance’ widget, I just found doing a simple CSS addition the WP-Admin Styles targetting:
wp-version-message { display: none; }
Works well.
Hi, how can I also remove the “x widgets” parts too?
I’ve tried to add it to my functions.php theme but it’s not working, it’s still displaying theme infos.
Hi Omar, do you get any sort of error or does this just not work ?
Thanks for this tip. Now, I can hide unwanted theme info. from dashboard.
Well you can always hide anything from dashboard by adding css that will hide info, however what is it you are looking at removing ?