I use wp_title to generate some kind of breadcrumb and it works well, but in there I have the title of the site, and I want to delete that. It looks like this:
Taxonomy1: City | Title of the site. I get that by using <?php wp_title(); ?>
.
How can I delete the title of the site in that output?
Take a look in header.php of your theme. Some themes have the title output like this:
So you’ll have to remove the
| <?php echo get_bloginfo('name') ?>
part.However you should keep the title of the site in the
<title>
for SEO purposes.There is probably a third-party filter running on the
wp_title
. Remove it before you call the function:You could use a plugin like WordPress SEO by Yoast and set templates for so if your title tags. You would then have the ability to override your templates at the post/page/category level