Support » Fixing WordPress » How to remove boxes from the Dashboard?

  • Resolved soumyadip

    (@soumyadip)


    How do you remove boxes from the dashboard – like ‘Other WordPress News’? Similarly, how do you remove boxes from the ‘Add new post’ section?
    Thanks so much for your help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Top right corner of the page. “Screen Options”.

    Thanks for that – but how do I do the same for the ‘Add new Post’ page.

    Top right corner of the page. “Screen Options”.

    🙂

    Ah I see – does that mean once I remove these boxes users (without admin rights) won’t be able to see them or add them back. Also is there any way to stop users from moving boxes around? Thanks a ton for your help. Really appreciate it.

    Those settings are on a per-user basis. They can move them around and arrange them however they want, and you won’t see a thing. Each user can customize his own view.

    Is there any way of removing the boxes so that the users don’t have the option of getting them – like by commenting out the code in the background. The users only have author rights – not admin rights.

    Even am looking for the same functionality as soumyadip.
    I want to remove both optons and help.

    WordPress doesn’t allow this by default, there are a number of plugins that allow you to customise the dashboard but these no longer work with 2.8
    You can always comment out the code until a plugin becomes available:
    wp-admin/includes/dashboard.php

    It seems to me that the code from the Dashboard Widgets API is fairly clear in how to remove core dashboard widgets. It’s not as simple as saying “remove dashboard widget”, but it’s still possible using a themes files rather than modifying the core.

    See:
    http://codex.wordpress.org/Dashboard_Widgets_API

    See the section “Advanced: Removing Dashboard Widgets”. Code copied is followed:

    // Create the function to use in the action hook
    
    function example_remove_dashboard_widgets() {
    	// Globalize the metaboxes array, this holds all the widgets for wp-admin
    
    	global $wp_meta_boxes;
    
    	// Remove the quickpress widget
    
    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    
    	// Remove the incomming links widget
    
    	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    } 
    
    // Hoook into the 'wp_dashboard_setup' action to register our function
    
    add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

    It would be nice to have a complementary function to the “wp_add_dashboard_widget” function called “wp_remove_dashboard_widget”. Maybe that will be in a future release.

    I had a similar issue and the unset($wp_meta_boxes) was fine until I wanted to granulate this on a per user-level basis.

    So I made a plugin to do just that. Just install, activate and set the minimum user-level visibility for each admin dashboard widget

    http://wordpress.org/extend/plugins/dashboard-heaven/

    Hope this helps.

    davekinkead,

    thank you very much my friend.. I was just looking for something like this. Many many thanks.

    Also do you know any plugins or edit options to limit the number of links that can be included in wordpress posts? I have too many contributors with my blog. 🙁

    I just posted a quick “how to” on this very thing here.
    http://wordpress.org/support/topic/393131

    Unsetting is better because the code never has to run, the CSS route leaves the code to run, it simply hides the box(es).

    For reference.
    http://wordpress.org/support/topic/363432

    Dashboard widgets to some degree work on a capability basis anyway, if a user does not have the rights to view/use/read the given data in the widget, it’s not likely to be available to them.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to remove boxes from the Dashboard?’ is closed to new replies.