Tag Info

New answers tagged


Please Change !is_admin() current user is administrator , is_admin() not check user but they check admin panel area please change in your code add_action('admin_head', 'remove_metaboxes_for_non_admin'); function remove_metaboxes_for_non_admin(){ global $current_user; if ($current_user->role[0]!='administrator') { ...


I don't think this will ever fire.... Is_admin() detects admin UI not admin priveleges... Try: if (is_admin()) : function my_remove_meta_boxes() { if( !current_user_can('manage_options') ) { remove_meta_box(...); }} add_action( 'admin_menu', 'my_remove_meta_boxes' ); endif;


OK, I'm just going to list things out as I go through. Some of what follows is stylistic feedback, some is security related, some is functional: <div class="home-featured-block"> <?php $featured_block=$profitmag_settings['featured_block_one']; $no_of_block=$profitmag_settings['no_of_block_one']; I don't ...

Top 50 recent answers are included