投稿画面からAll in One SEO Packの欄を消す
投稿画面のAll in One SEO Packの欄(meta box)を削除したい場合、テーマのfunctions.phpに下記のように記載します。
1 2 3 4 |
function remove_aiosp_meta_box() { remove_meta_box( 'aiosp', 'post', 'advanced' ); } add_action( 'admin_menu' , 'remove_aiosp_meta_box', 1000 ); |
管理者以外は削除
投稿画面のAll in One SEO Packの欄(meta box)を使用できるのを管理者のみとしたい場合、テーマのfunctions.phpに下記のように記載します。
1 2 3 4 5 6 |
function remove_aiosp_meta_box() { if ( ! current_user_can( 'administrator' ) ) { remove_meta_box( 'aiosp', 'post', 'advanced' ); } } add_action( 'admin_menu' , 'remove_aiosp_meta_box', 1000 ); |