fbpx

Simplificar o Admin do WordPress na unha.

Vai no arquivo functions do seu child theme e coloca o código abaixo.

Ele oculta todas as abas para quem nao é o admin principal.

--

<?php

$identificacao = wp_get_current_user()->ID;

print($identificacao);

if($identificacao != 1){
add_action(‘admin_head’, ‘my_custom_fonts’);

}
function my_custom_fonts() {
echo ‘<style>
#menu-dashboard{display:none!important;}
#menu-posts{display:none!important;}
#menu-posts-mtheme_featured{display:none!important;}
#menu-pages{display:none!important;}
#menu-comments{display:none!important;}
#toplevel_page_options-framework{display:none!important;}
#menu-plugins{display:none!important;}
#menu-tools{display:none!important;}
#menu-settings{display:none!important;}
#toplevel_page_loco{display:none!important;}
#menu-users{display:none!important;}
.update-nag{display:none!important;}
#commentstatusdiv{display:none!important;}
#commentsdiv{display:none!important;}
#slugdiv{display:none!important;}
#authordiv{display:none!important;}
#menu-appearance{display:none!important;}
.metabox-wrapper {
padding: 0px!important;
}
.maintitle{padding:10px}
.metabox-fields {
padding: 10px;
}
.metabox-column{
width: 100%!important;
margin-left: 0px!important;
}.metabox-fields.metaboxtype_datepicker.textsmall.is_subtitle {
display: none!important;
}
#menu-posts-portfolio
#menu-posts-cms_block
#menu-posts-woodmart_size_guide{display:none!important;}
#menu-posts-woodmart_slide{display:none!important;}
#toplevel_page_xtemos_options{display:none!important;}
#toplevel_page_woodmart_dashboard{display:none!important;}
#menu-posts-woodmart_sidebar{display:none!important;}
#toplevel_page_vc-general{display:none!important;}
#toplevel_page_mailchimp-for-wp{display:none!important;}
#toplevel_page_duplicator{display:none!important;}
#menu-posts-portfolio{display:none!important;}
#menu-posts-cms_block{display:none!important;}
#menu-posts-woodmart_size_guide{display:none!important;}
div#vc_license-activation-notice {
display: none!important;
}
div#xts_product_metaboxes {
display: none!important;
}
.composer-switch {
display: none!important;
}
</style>’;
}?>

--

Deixe um comentário

O seu endereço de e-mail não será publicado.