Bootstrap theme - add or remove classes in $navbar_classes I'm using the bootstrap theme, by default in page.tpl.php the nav bar is outputted like so:

&lt;header id="navbar" role="banner" class="&lt;?php print $navbar_classes; ?&gt;"&gt;


Where can I edit the $navbar_classes variable called in the header tag so I can add or remove classes?
function YOURTHEME_preprocess_page(&amp;$vars) {
      //add news class
      $vars['navbar_classes_array'][] = 'new-class';
      //remove class
      unset($vars['navbar_classes_array'][0]);
      // you need change value 0 to value you want remove class
      // Default
      // 0  'navbar', 1 =&gt; 'container', 2 =&gt; 'navbar-default'

}


You can do it with


Override file page.tpl.php. You can copy file page.tpl.php in bootstrap/theme/system/page.tpl.php to new your subtheme and edit it. It is right way.
Or you can use function hook_preprocess_page(). You can write code in file template.php of your subtheme. That way you don't need change file page.tpl.php