How To: Remove or Edit Dashboard’s Right Now At A Glance Information in WordPress Admin Area

send free sms with photos videos from mobile phones

An admin’s dashboard is one wealth of information which gives a glimpse of what’s happening on the frontend of the blog and as well as the back-end. The WordPress Dashboard is reached by providing authentication at the sitename.tld/wp-admin level and if the credentials match the ones saved in the database.

Wordpress Dashboard Right Now At a Glance

As you can see in the above image, the screen consists of ‘Right Now’ widget in the Dashboard. This widget provides the crucial information like

  • Total Number of Posts
  • Total Number of Pages
  • Total Number of Categories and
  • Total Number of Tags

as well as

  • Total Comments
  • Approved Comments
  • Pending for Approval or Deletion Comments
  • Number of spam comments

Below this section, the text describes the WordPress theme being used along with the total number of widgets on the blog. In addition to that, the screen also provides a glimpse of the version number of wordpress.

I wish to remove all these as this information is irrelevant to my client. Where do I find the code for this? The location and the file where this information is being displayed is located at:

wp-admin/includes/dashboard.php

This is the file which we need to edit in order to remove the two lines and ‘Change Theme’ button. Now, open this file and go to line number 319 or search for this function ‘wp_dashboard_right_now’.

Now edit or comment or remove the code starting with ‘$ct = current_theme_info();’ to ‘echo “\n\t”.’<br /></div>’;’

echo "\n\t".'<div>';
 $ct = current_theme_info();

 echo "\n\t<p>";
 if ( !empty($wp_registered_sidebars) ) {
 $sidebars_widgets = wp_get_sidebars_widgets();
 $num_widgets = 0;
 foreach ( (array) $sidebars_widgets as $k => $v ) {
 if ( 'wp_inactive_widgets' == $k )
 continue;
 if ( is_array($v) )
 $num_widgets = $num_widgets + count($v);
 }
 $num = number_format_i18n( $num_widgets );

 if ( current_user_can( 'switch_themes' ) ) {
 echo '<a href="themes.php">' . __('Change Theme') . '</a>';
 printf(_n('Theme <span><a href="themes.php">%1$s</a></span> with <span><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span><a href="themes.php">%1$s</a></span> with <span><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $ct->title, $num);
 } else {
 printf(_n('Theme <span>%1$s</span> with <span>%2$s Widget</span>', 'Theme <span>%1$s</span> with <span>%2$s Widgets</span>', $num_widgets), $ct->title, $num);
 }
 } else {
 if ( current_user_can( 'switch_themes' ) ) {
 echo '<a href="themes.php">' . __('Change Theme') . '</a>';
 printf('Theme <span><a href="themes.php">%1$s</a></span>', $ct->title);
 } else {
 printf('Theme <span>%1$s</span>', $ct->title);
 }
 }
 echo '</p>';

 update_right_now_message();

 echo "\n\t".'<br /></div>';

This clears the Theme information and as well as the WordPress version number. This also removes the ‘Change Theme’ option there by restricting the client’s webmasters editing the templates of Themes and Plugins.

Blog Widget by LinkWithin

Leave a Reply

CommentLuv badge