Advertisement
Guest User

Untitled

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