• http://showmantell.com

    I added this code to functions.php so the user wouldn’t have access to this stuff in the dashboard, but now when I try to log-in with my sidebar login widget, it just refreshes the page and doesn’t do anything, when i remove the code it’s fine again.. any ideas?

    require( get_template_directory() . '/includes/admin/help.php' );
    add_action( 'admin_init', 'my_remove_menu_pages' );
    
    function my_remove_menu_pages() {
        // If the user does not have access to publish posts
        if(!current_user_can('publish_posts')) {
        	// Remove the "Tools" menu
    		remove_menu_page('edit-comments.php','tools.php');
            remove_menu_page('tools.php');
            remove_menu_page('index.php');
    	}
    }

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

  • The topic ‘Added this to functions.php and my login sidebar stopped working’ is closed to new replies.