Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rvs0002

    (@rvs0002)

    Nevermind, I figured it out. I just had my user’s access level set too low.

    You could hide it with CSS like I did pre-v1.1. IF you’re using v1.1 or later, the following should work for you:

    /**
     * Hide the Admin menu with CSS.
     */
    function prefix_hide_admin_menu() {
    	$settings = get_option( 'rda_access_cap' );
    
    	if ( ! current_user_can( $settings ? $settings : 'manage_options' ) : ?>
    		<style type="text/css">
    		#adminmenuback, #adminmenuwrap {
    			display: none;
    		}
    		.wrap {
    			margin-top: 1.5%;
    		}
    		#wpcontent {
    			margin-left: 2%;
    		}
    	<?php endif; ?>
    }
    add_action( 'admin_head', 'prefix_hide_admin_menu' );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get rid of black sidebar on left?’ is closed to new replies.