do the magic include('magic-add-cloned-sites.php'); } else { //Normal page display // fetch existing blogs //$the_blogs = get_blog_list( 1, 'all' ); could this also work? ->later $tbl_blogs = $wpdb->prefix ."blogs"; $the_blogs = $wpdb->get_results( "SELECT blog_id, domain FROM $tbl_blogs WHERE blog_id <> '1'" ); // fetch existing users $tbl_users = $wpdb->prefix ."users"; $the_users = $wpdb->get_results( "SELECT ID, user_login FROM $tbl_users" ); // check for errors if(!$the_blogs) { $error['blogs'] = "there are no templates to choose from"; } if(!$the_users) { $error['users'] = "there are no users, which is impossible.."; } // if there are no errors continue if(!$error) { ?>