サポート » 使い方全般 » ダッシュボードのメニュー以外の部分を常に真っ白にしたい

  • 今現在、ポータルサイトを構築していて、完成間近なのですが、
    一点教えていただきたいことがございます。

    寄稿者ユーザーと購読者ユーザーが利用するサイトなのですが、
    寄稿者と購読者の管理画面のダッシュボードのメニュー以外の部分を常に真っ白に
    しておきたいです。

    http://ja.forums.wordpress.org/topic/3653?replies=13

    より、下記のコードを入手し、不要なダッシュボード上のウィジットは削除できたので
    すが、”表示オプション”の「表示する項目」のなかの、”現在の状況”と”Right now in
    Forums”の部分が生きているために、マニュアルでチェックをはずさないと、真っ白に
    することができません。
    チェックをはずすはずさないにかかわらず、常に真っ白にしたいです。

    表示オプションの機能自体を無効にすることができれば実現できると思うのですが、
    どのようにすればいいかご教示いただけないでしょうか。

    よろしくお願い申し上げます。

    remove_all_actions('wp_dashboard_setup');
    
    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']['normal']['core']['dashboard_recent_comments']);
    	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    	unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    	unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
    
    } 
    
    // Hoook into the 'wp_dashboard_setup' action to register our function
    
    add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );
1件の返信を表示中 - 1 - 1件目 (全1件中)
  • こんにちは、

    なんちゃって真っ白ですが、

    add_action('admin_head-index.php', 'widget_title_hide');
    
    function widget_title_hide(){
    ?>
    <style>
    #screen-options-link-wrap,
    #contextual-help-link-wrap,
    #dashboard_right_now{
    
    	display:none;
    }
    </style>
    <?php
    }

1件の返信を表示中 - 1 - 1件目 (全1件中)
  • トピック「ダッシュボードのメニュー以外の部分を常に真っ白にしたい」には新たに返信することはできません。