Advertisement
pratikshrestha

Remove Archive pre title

Jul 17th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. add_filter( 'get_the_archive_title', function ($title) {
  2.  
  3.     if ( is_category() ) {
  4.  
  5.             $title = single_cat_title( '', false );
  6.  
  7.         } elseif ( is_tag() ) {
  8.  
  9.             $title = single_tag_title( '', false );
  10.  
  11.         } elseif ( is_author() ) {
  12.  
  13.             $title = '<span class="vcard">' . get_the_author() . '</span>' ;
  14.  
  15.         }
  16.  
  17.     return $title;
  18.  
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement