mh_newsdesk_lite_page_title

The MH Newsdesk lite mh newsdesk lite page title function.

Description

mh_newsdesk_lite_page_title(); 

Usage

  1. if ( !function_exists( 'mh_newsdesk_lite_page_title' ) ) { 
  2. require_once '/includes/mh-custom-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = mh_newsdesk_lite_page_title(); 
  7.  

Defined (1)

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

/includes/mh-custom-functions.php  
  1. function mh_newsdesk_lite_page_title() { 
  2. if (!is_front_page()) { 
  3. echo '<h1 class="page-title">'; 
  4. if (is_archive()) { 
  5. if (is_category() || is_tax()) { 
  6. single_cat_title(); 
  7. } elseif (is_tag()) { 
  8. single_tag_title(); 
  9. } elseif (is_author()) { 
  10. global $author; 
  11. $user_info = get_userdata($author); 
  12. printf(_x('Articles by %s', 'post author', 'mh-newsdesk-lite'), esc_attr($user_info->display_name)); 
  13. } elseif (is_day()) { 
  14. echo get_the_date(); 
  15. } elseif (is_month()) { 
  16. echo get_the_date('F Y'); 
  17. } elseif (is_year()) { 
  18. echo get_the_date('Y'); 
  19. } elseif (is_post_type_archive()) { 
  20. global $post; 
  21. $post_type = get_post_type_object(get_post_type($post)); 
  22. echo $post_type->labels->name; 
  23. } else { 
  24. _e('Archives', 'mh-newsdesk-lite'); 
  25. } else { 
  26. if (is_home()) { 
  27. echo get_the_title(get_option('page_for_posts', true)); 
  28. } elseif (is_404()) { 
  29. _e('Page not found (404)', 'mh-newsdesk-lite'); 
  30. } elseif (is_search()) { 
  31. printf(__('Search Results for %s', 'mh-newsdesk-lite'), esc_attr(get_search_query())); 
  32. } else { 
  33. the_title(); 
  34. echo '</h1>' . "\n";