Trying to see if page is category or single and displaying title with appropriate heading tag

aha…white screen of death. I don’t know how I missed it. Your if statement lacks parenthesis.

Try this:

public function title() {
  if ( is_category() ) {
    echo '<h2 class="post_title">';
    } else {
    echo '<h1 class="post_title">';
};
  echo '<a href="';
  the_permalink();
  echo '" data-disqus-identifier="';
  the_ID();
  echo '">';
  the_title();
  if ( is_category() ) {
      echo '</a></h2>';
    } else {
      echo '</a></h1>';
};
}

stackexchange needs syntax highlighting 🙂