Just a few notes from what you have so far:
- I agree with Dave Hall, create a subtheme instead of hacking on Bartik in core
- Your logic is backwards, you would be looking for
if (drupal_is_front_page()) {...
instead of if (!drupal_is_front_page()) {...
- There is no function
drupal_is_taxonomy()
(unless you created it)
- The core style is
element-invisible
instead of two separate classes element invisible
(again unless you created these classes separately)
A really easy way to remove these titles is to create simple template files and remove the code that prints the title. For instance, using the code from Bartik's page.tpl.php, copy all the code and create 2 files: page--front.tpl.php and page--taxonomy--term.tpl.php. Inside those files you can remove
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<h1 class="title" id="page-title">
<?php print $title; ?>
</h1>
<?php endif; ?>
<?php print render($title_suffix); ?>
Save the files to your theme, and clear the cache.