プロフィールのいらんのを消す css3 カスタムアドミン2

@charset "utf-8";

#profile-page h3,
#profile-page table:nth-of-type(1) tr:nth-child(1),
#profile-page table:nth-of-type(1) tr:nth-child(2),
#profile-page table:nth-of-type(1) tr:nth-child(3),
#profile-page table:nth-of-type(1) tr:nth-child(4),
#profile-page table:nth-of-type(1) tr:nth-child(5),
#profile-page table:nth-of-type(2) tr:nth-child(2),
#profile-page table:nth-of-type(2) tr:nth-child(3),
#profile-page table:nth-of-type(2) tr:nth-child(4),
#profile-page table:nth-of-type(2) tr:nth-child(5),

#profile-page table:nth-of-type(3) tr:nth-child(2),
#profile-page table:nth-of-type(3) tr:nth-child(3),
#profile-page table:nth-of-type(3) tr:nth-child(4),
#profile-page table:nth-of-type(3) tr:nth-child(5),
#profile-page table:nth-of-type(4) tr:nth-child(1),
#footer-ozh-oam,#footer-upgrade
{
    display: none;
}

特定の権限にカスタムアドミンを読み込ます

//CSSで管理画面内のサイドメニューを非表示にする 権限指定
function custom_admin_styles(){
$current_user = wp_get_current_user(); //現在のユーザー情報を取得
        if(check_user_role($current_user,'author')){ //編集者(editor)かチェック
            echo '<link rel="stylesheet" type="text/css" href="' .get_bloginfo('template_directory'). '/custom-admin-css2.css" />';
        }
		if(check_user_role($current_user,'reader')){ //編集者(editor)かチェック
            echo '<link rel="stylesheet" type="text/css" href="' .get_bloginfo('template_directory'). '/custom-admin-css2.css" />';
        }
		
		
    }
    add_action('admin_print_styles', 'custom_admin_styles', 21);

    /*
     * ユーザーの権限をチェックする
     * @param $user ユーザーオブジェクト
     * @param $role ユーザー権限の文字列
     *      (administrator, editor, author, contributor, subscriber)
     */
    function check_user_role($user,$role){
        foreach($user->roles as $user_role){
            if($user_role === $role){
                return true;
            }
        }
        return false;
    }

管理画面改造まとめ

ユーザー投稿者でつくり

http://www.memo.d-marking.com/?p=690

ドロップダウン

メニューエディタで権限を変えていく。

 

ファンクションでアドミンバも消す。

もしくはオリジナルメニュー

http://www.memo.d-marking.com/?p=707

 

クライアントidで表示オプション コメント消す

カスタムポストタイプで

新規追加 編集を書く

 

 

新カレントメニューの作り方 画像置き換え含む

ヘッダー

<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>

<!--画像カレントホバー-->
<script type="text/javascript" >
$(function(){

 $(".d_navi_main_in li:not(.current) a").each(function(){
  var a = $(this);
  var img = a.find("img");
  var src_off = img.attr("src");
  var src_on = src_off.replace(/^(.+)_off(\.[^\.]+)$/,"$1_on$2");

  $("<img />").attr("src",src_on);

  a.bind("mouseenter focus", function(){
		img.attr("src", src_on);
		});

  a.bind("mouseleave blur", function(){
		img.attr("src", src_off);
		});
	});
});

 //current表示
$(function() {
  if ($('.d_navi_main_in li').hasClass('current')) {
 $(".d_navi_main_in li.current a img").attr("src",$(".d_navi_main_in li.current a img").attr("src").replace(/^(.+)_off(\.[^\.]+)$/,"$1_current$2"));
  }
});
</script>
#d_sidenavi_in ul li.current a {
	color: #71B5FF!important;
	text-decoration: none!important;
	border-top-color: #71B5FF!important;
	border-right-color: #71B5FF!important;
	border-bottom-color: #71B5FF!important;
	border-left-color: #71B5FF!important;
}
<!--メインナビ-->
<div class="d_navi_main_all">
  <div class="d_navi_main_width">
    <div class="d_navi_main_in">
<ul> 
  <li <?php if(is_home()): ?> class="current"<?php endif; ?>>
  <a href="<?php echo home_url(); ?>"><img src="img/main_menu/menu_put-01_off.jpg" width="192" height="70" /></a></li>
  
  <li <?php if(is_page( '21' )): ?> class="current"<?php endif; ?>>
  <a href="<?php echo home_url(); ?>/?page_id=21"><img src="img/main_menu/menu_put-02_off.jpg" width="213" height="70" /></a></li>
  
  <li <?php if(is_page( '19' ) or is_category() or in_category(array(1,2) and is_single())): ?> class="current"<?php endif; ?>>
  <a href="<?php echo home_url(); ?>/?page_id=19"><img src="img/main_menu/menu_put-03_off.jpg" width="199" height="70" /></a></li>
  
  <li <?php if(is_page( '23' )): ?> class="current"<?php endif; ?>>
  <a href="<?php echo home_url(); ?>/?page_id=23"><img src="img/main_menu/menu_put-04_off.jpg" width="194" height="70" /></a></li>
  
  <li <?php if(is_page( '25' )): ?> class="current"<?php endif; ?>>
  <a href="<?php echo home_url(); ?>?page_id=25"><img src="img/main_menu/menu_put-05_off.jpg" width="202" height="70" /></a></li>
  
  
</ul>
    </div class="d_navi_main_in">
  </div class="d_navi_main_width">
</div class="d_navi_main_all">
<!--/メインナビ-->  
         <ul>
    
    <li <?php if(is_page( '28' )): ?> class="current"<?php endif; ?>>
    <a href="<?php echo home_url(); ?>/?page_id=28">理事長ご挨拶</a></li>
    
    <li <?php if(is_page( '30' )): ?> class="current"<?php endif; ?>>
    <a href="<?php echo home_url(); ?>/?page_id=30">メンバー紹介</a></li>
    
    <li class="space"></li>
    <li class="dash"></li>
    <li class="space"></li>
     
    
     <li <?php if(is_category(1) or in_category(array(1) and is_single())): ?> class="current"<?php endif; ?>>
     <a href="<?php echo home_url(); ?>/?cat=1">お知らせ</a></li>
     
    <li <?php if(is_category(2) or in_category(array(2) and is_single())): ?> class="current"<?php endif; ?>>
    <a href="<?php echo home_url(); ?>/?cat=2">活動報告</a></li>
    
    <li class="space"></li>
    <li class="dash"></li>
    <li class="space"></li>
        <li <?php if(is_page( '32' )): ?> class="current"<?php endif; ?>>
        <a href="<?php echo home_url(); ?>/?page_id=32">リンク</a></li>
        
    <li <?php if(is_page( '62' )): ?> class="current"<?php endif; ?>>
    <a href="<?php echo home_url(); ?>/?page_id=62">公開情報</a></li>
    

  
    <li class="space"></li> <li class="space"></li>
    
    <li class="kyuujc"><a href="http://setojcnews.jugem.jp/" target="_blank">旧JC NEWS</a></li>
        

          <li class="space"></li> <li class="space"></li>
          
           <li class="member<?php if(is_page( '64' )): ?> current<?php endif; ?>" ><a href="<?php echo home_url(); ?>/?page_id=64"> メンバーページ</a></li>
          
          
        </ul>