Override taxonomy term page title

Public

put this into your module

Get raw version
php
  1. /**
  2.  * Override taxonomy term page title
  3.  * @param array $variables
  4.  */
  5. function your_module_process_page(&$variables) {
  6. if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2)) && arg(2) > 0) {
  7. $tid = arg(2);
  8.  
  9. if (!empty($tid)) {
  10. $new_title = 'Your custom title here';
  11. // H1.
  12. $variables['title'] = $new_title;
  13. // Title bar.
  14. drupal_set_title($new_title);
  15. }
  16. }
  17. }