inkthemes_wp_title

Filters the page title appropriately depending on the current page.

Description

inkthemes_wp_title( $title ); 

This function is attached to the wp_title fiilter hook.

Parameters (1)

0. $title
The title.

Usage

  1. if ( !function_exists( 'inkthemes_wp_title' ) ) { 
  2. require_once '/functions/inkthemes-functions.php'; 
  3.  
  4. // The title. 
  5. $title = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = inkthemes_wp_title($title); 
  9.  

Defined (1)

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

/functions/inkthemes-functions.php  
  1. function inkthemes_wp_title( $title ) { 
  2. global $page, $paged; 
  3.  
  4. if ( is_feed() ) 
  5. return $title; 
  6.  
  7. $site_description = get_bloginfo( 'description' ); 
  8.  
  9. $filtered_title = $title . get_bloginfo( 'name' ); 
  10. $filtered_title .= ( ! empty( $site_description ) && ( is_home() || is_front_page() ) ) ? ' | ' . $site_description: ''; 
  11. $filtered_title .= ( 2 <= $paged || 2 <= $page ) ? ' | ' . sprintf( __( 'Page %s', 'blcr' ), max( $paged, $page ) ) : ''; 
  12.  
  13. return $filtered_title;