I think you need to display extra fields one by one, not a loop like the default.
if so, replace the code of displaying extra fields as below
for the field label/name, use this:
<?php echo $this->item->extraFields->fieldAlias->name ; ?>
for the field value, use this:
<?php echo $this->item->extraFields->fieldAlias->value ; ?>
where you get the fieldAlias from the extra fields manager in the backend.