Advertisement
daymobrew

Add prefix text to category title

Apr 8th, 2016
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. add_filter('get_term_metadata', 'bch_change_category_title', 10, 4);
  2. function bch_change_category_title( $null, $term_id, $key, $single ) {
  3.     if ('headline' == $key) {
  4.         $term = get_term( $term_id);
  5.         return 'History of Unit '.$term->name;
  6.     }
  7.     return null;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement