2012-04-09 16 views
2

Wordpressの管理者にadd_menu_pageというカスタムメニューを作成しましたが、この新しいトップレベルメニューの下で既存のサブメニュー(例:外観>ヘッダー)を移動するにはどうすればよいですか?Wordpress管理のサブメニューへ移動

答えて

-1
For adding submenu to main menu.Follow the below steps: 


1. Go to Appearance->Menus.In Menus window,on right hand side,you will see the added 
    menus list.Just move the mouse over the menu name which you want to be the sub menu,an 
    hand symbol will come,then just drag and move the menu little bit to the right side 
    below the main menu to which you want this menu to be the sub menu. 
+0

私はあなたが質問を読んだとは思わない。彼はwp-adminメニューを編集する方法を尋ねています。フロントエンドのメニューではありません –

0

調査の結果、グローバル$サブメニューを呼び出すことができました。

global $submenu 

foreach ($submenu['index.php'] as $key => $subItem) { 
    if ($subItem[2] === 'update-core.php') { 
     $submenu['options-general.php'][0.1] = $subItem; 

     ksort($submenu['options-general.php']); 
    } 
} 
unset($submenu['index.php'][$key]; 

私はまだかかわらず、考え出したていない一つのことは、サブメニューが時に展開されていない別名WPの管理者が親の変更を(認識させる方法です。そうのように、この変数を使用すると、サブメニューの出回っ存在を移動することができます私はこのサブメニューページにいます)。

この回答にはいくつかの改善点があります。

関連する問題