function st_wp_title($title, $sep) { if (is_feed()) { return $title; } global $page, $paged; // Add the blog name //$title = get_bloginfo('name', 'display'); // // Add the blog description for the home/front page. // $site_description = get_bloginfo('description', 'display'); // if ($site_description && (is_home() || is_front_page())) { // $title .= " $sep $site_description"; // } // Add a page number if necessary: if (($paged >= 2 || $page >= 2) && !is_404()) { $title .= " {$sep} " . sprintf(__('Page %s', ST_TEXTDOMAIN), max($paged, $page)); } if (is_search()) { $post_type = STInput::get('post_type'); $s = STInput::get('s'); $location_id = STInput::get('location_id'); $extra = ''; if (post_type_exists($post_type)) { $post_type_obj = get_post_type_object($post_type); $extra .= ' ' . $post_type_obj->labels->singular_name; } if ($location_id and $location_name = get_the_title($location_id)) { $extra .= sprintf(__(' in %s', ST_TEXTDOMAIN), $location_name); } if ($extra) { $extra = __('Search for ', ST_TEXTDOMAIN) . $extra; } $title = $extra . $title; } if (is_page_template('template-user.php')) { $title_tmp = get_bloginfo('name', 'display'); $title = STUser_f::st_get_title_head_partner() . " | " . $title_tmp; } return $title; }