responsive_mobile_archive_title

Prints respective title for the archive page.

Description

responsive_mobile_archive_title( (bool) $display = true ); 

Parameters (1)

0. $display — Optional. (bool) => true
The display.

Usage

  1. if ( !function_exists( 'responsive_mobile_archive_title' ) ) { 
  2. require_once '/includes/functions-template-tags.php'; 
  3.  
  4. // The display. 
  5. $display = true; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = responsive_mobile_archive_title($display); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/functions-template-tags.php  
  1. function responsive_mobile_archive_title( $display = true ) { 
  2. if ( is_category() ) { 
  3. $archive_title = single_cat_title( "", false ); 
  4.  
  5. } elseif ( is_tag() ) { 
  6. $archive_title = single_tag_title( "", false ); 
  7.  
  8. } elseif ( is_author() ) { 
  9. $archive_title = sprintf( __( 'Author: %s', 'responsive-mobile' ), '<span class="vcard">' . get_the_author() . '</span>' ); 
  10.  
  11. } elseif ( is_day() ) { 
  12. $archive_title = sprintf( __( 'Daily Archives: %s', 'responsive-mobile' ), '<span>' . get_the_date() . '</span>' ); 
  13.  
  14. } elseif ( is_month() ) { 
  15. $archive_title = sprintf( __( 'Monthly Archives: %s', 'responsive-mobile' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'responsive-mobile' ) ) . '</span>' ); 
  16.  
  17. } elseif ( is_year() ) { 
  18. $archive_title = sprintf( __( 'Yearly Archives: %s', 'responsive-mobile' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'responsive-mobile' ) ) . '</span>' ); 
  19.  
  20. } elseif ( is_tax( 'post_format', 'post-format-aside' ) ) { 
  21. $archive_title = __( 'Asides', 'responsive-mobile' ); 
  22.  
  23. } elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) { 
  24. $archive_title = __( 'Galleries', 'responsive-mobile' ); 
  25.  
  26. } elseif ( is_tax( 'post_format', 'post-format-image' ) ) { 
  27. $archive_title = __( 'Images', 'responsive-mobile' ); 
  28.  
  29. } elseif ( is_tax( 'post_format', 'post-format-video' ) ) { 
  30. $archive_title = __( 'Videos', 'responsive-mobile' ); 
  31.  
  32. } elseif ( is_tax( 'post_format', 'post-format-quote' ) ) { 
  33. $archive_title = __( 'Quotes', 'responsive-mobile' ); 
  34.  
  35. } elseif ( is_tax( 'post_format', 'post-format-link' ) ) { 
  36. $archive_title = __( 'Links', 'responsive-mobile' ); 
  37.  
  38. } elseif ( is_tax( 'post_format', 'post-format-status' ) ) { 
  39. $archive_title = __( 'Statuses', 'responsive-mobile' ); 
  40.  
  41. } elseif ( is_tax( 'post_format', 'post-format-audio' ) ) { 
  42. $archive_title = __( 'Audios', 'responsive-mobile' ); 
  43.  
  44. } elseif ( is_tax( 'post_format', 'post-format-chat' ) ) { 
  45. $archive_title = __( 'Chats', 'responsive-mobile' ); 
  46.  
  47. } else { 
  48. $archive_title = __( 'Archives', 'responsive-mobile' ); 
  49.  
  50.  
  51. if ( $display ) { 
  52. echo $archive_title; 
  53. } else { 
  54. return $archive_title; 
  55.