Implemented foreach loop to do array data_list()s

Also, suppressed an error message in functions.php