Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @ ChrisFryer

    <?php $single=false; ?> does not work,

    but <?php $wp_query->is_single=false; ?> works fine

    With my code the profile page become inaccessible. If I try to access “/wp-admin/profile.php” the following message is shown: “You do not have sufficient permissions to access this page”.


    function page_restrict_adminhead() {
      global $submenu, $menu;
      if(!current_user_can('level_10')){
       unset($menu[35]); // hide Users or Profile
       unset($submenu['profile.php']);
       if (preg_match('|/wp-admin/profile.php|', $_SERVER['REQUEST_URI'])) {
        die(__("You do not have sufficient permissions to access this page."));
       }
      }
    }

Viewing 2 replies - 1 through 2 (of 2 total)