Hide Elements Plugin not working with a modified theme

Hi, I've done some modifications in the show.php of the default theme and when I've tried to use the Hide Elements Plugin it hasn't worked.

Here is the code that I use to display Item Type Metadata:


<?php
$ifa=0;
echo '<table>';
foreach ( array_keys(item_type_elements($item)) as $key ){
if ($ifa == 0) {
$value=metadata($item,array('Item Type Metadata',$key));
if ($value!=''){
echo '<tr><td width="5%" bgcolor="#CCCCCC"><h7>'.$key.'</h7></td><td width="20%">'.$value.'</td></tr>';
$ifa=1;
}
}
elseif ($ifa == 1) {
$value=metadata($item,array('Item Type Metadata',$key));
if($value!=''){
echo '<tr><td width="5%" bgcolor="#949494"><h7>'.$key.'</h7></td><td width="20%">'.$value.'</td></tr>';
$ifa=0;
}
}
}
echo '</table>';
?>

I would like to know if there's a way to adapt the plugin or if I have to find some other way to hide the elements that I don't want to show to the public.

Thanks in advance!

Hide Elements only works with the all_element_texts function that themes normally use.

You're effectively telling Omeka to manually print each element in order. Hide Elements doesn't affect that.