Advertisement
phpface

Untitled

Jun 23rd, 2018
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. if( ! function_exists( 'videotube_filter_the_archive_title' ) ){
  2.     /**
  3.      * Filter the archive title.
  4.      * @param string $archive_title
  5.      */
  6.     function videotube_filter_the_archive_title( $archive_title ) {
  7.        
  8.         if( is_tax( 'categories' ) || is_tax( 'video_tag' ) ){
  9.             $archive_title  =   single_term_title( '', false );
  10.         }
  11.        
  12.         return $archive_title;
  13.     }
  14.     add_filter( 'get_the_archive_title' , 'videotube_filter_the_archive_title', 10, 1 );
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement