WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to remove boxes from the Dashboard? (14 posts)

  1. soumyadip
    Member
    Posted 4 years ago #

    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.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    Top right corner of the page. "Screen Options".

  3. soumyadip
    Member
    Posted 4 years ago #

    Thanks for that - but how do I do the same for the 'Add new Post' page.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    Top right corner of the page. "Screen Options".

    :)

  5. soumyadip
    Member
    Posted 4 years ago #

    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.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    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.

  7. soumyadip
    Member
    Posted 4 years ago #

    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.

  8. ajaykumarmeher
    Member
    Posted 4 years ago #

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

  9. perfecthill
    Member
    Posted 4 years ago #

    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

  10. horizonm
    Member
    Posted 4 years ago #

    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.

  11. davekinkead
    Member
    Posted 4 years ago #

    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.

  12. flek
    Member
    Posted 3 years ago #

    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. :(

  13. noelgreen
    Member
    Posted 3 years ago #

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

  14. Mark / t31os
    Moderator
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic