Forums

[resolved] Where is Widgets on the Appearance Menu - WP2.7 (8 posts)

  1. SleepW
    Member
    Posted 3 years ago #

    I'm customizing 2.7 from menu.php and can't find the Widgets entry in the Appearance menu. It obviously does not exist as static text. Anyone know how to delete it from the menu.
    TIA

  2. ronchicago
    Member
    Posted 3 years ago #

    you should be able to see

    themes
    widgets
    editor

    in the appearance menu

  3. SleepW
    Member
    Posted 3 years ago #

    I'm not trying to make them appear, I'm trying to make them disappear.

    I already deleted the editor since I edit from notepad locally. Now I'm trying to delete Widgets..don't use them, never will.

  4. SleepW
    Member
    Posted 3 years ago #

    Still haven't found it....

  5. ClaytonJames
    Member
    Posted 3 years ago #

    See if lines 272-278 in dashboard.php look like anything you want.

    /wp-admin/includes/dashboard.php.

    a quick grep for href="widgets.php" got two hits.

  6. SleepW
    Member
    Posted 3 years ago #

    Thanks Clayton.
    I actually resolved this one by editing functions.php. You just need to comment out the submenu line. Very strange how they did not include this in the menu.php file.

    /**
     * Append the Widgets menu to the themes main menu.
     *
     * @since 2.2.0
     * @uses $submenu The administration submenu list.
     */
    function wp_widgets_add_menu() {
    	global $submenu;
    	//$submenu['themes.php'][7] = array( __( 'Widgets' ), 'switch_themes', 'widgets.php' );
    	ksort( $submenu['themes.php'], SORT_NUMERIC );
    }
  7. goofygoodwin
    Member
    Posted 3 years ago #

    OMG THANK YOU

    This was one of those things I was like Whaaaa?

    Why would they not include it in the menu.php? Oh well.

    THANKS!

  8. SleepW
    Member
    Posted 2 years ago #

    Why would they not include it in the menu.php?

    Good question. I think it might be code bloat...that's when the slopiness starts.

Topic Closed

This topic has been closed to new replies.

About this Topic