Display tag name, not slug, in title. Props ionfish. fixes #4812
git-svn-id: https://develop.svn.wordpress.org/trunk@5945 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9b4a30290f
commit
06515b9839
|
@ -186,15 +186,15 @@ function wp_title($sep = '»', $display = true) {
|
||||||
else
|
else
|
||||||
$category_name = $category_name[count($category_name)-2]; // there was a trailling slash
|
$category_name = $category_name[count($category_name)-2]; // there was a trailling slash
|
||||||
}
|
}
|
||||||
$cat = get_term_by('slug', $category_name, 'category');
|
$cat = get_term_by('slug', $category_name, 'category', OBJECT, 'display');
|
||||||
if ( $cat )
|
if ( $cat )
|
||||||
$title = apply_filters('single_cat_title', $cat->name);
|
$title = apply_filters('single_cat_title', $cat->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty($tag) ) {
|
if ( !empty($tag) ) {
|
||||||
$tag = get_term($tag, 'post_tag');
|
$tag = get_term($tag, 'post_tag', OBJECT, 'display');
|
||||||
if ( ! empty($tag->name) )
|
if ( ! empty($tag->name) )
|
||||||
$title = apply_filters('single_tag_title', $tag->slug);
|
$title = apply_filters('single_tag_title', $tag->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there's an author
|
// If there's an author
|
||||||
|
|
Loading…
Reference in New Issue