Template.php - Hiding Specific Element on Node Edit
As fast solution, verify the value returned from arg(2) is different from 'edit'.

   function mytheme_preprocess_page(&amp;$vars, $hook) {
      if (in_array('page__mypagetype', $vars['theme_hook_suggestions']) &amp;&amp; arg(2) != 'edit) {
        $vars['custom_element'] = my_custom_element();
      }
    }