Does anyone know how to get the “site title” to not display in the title? I have added the All in One SEO plugin and am adding my meta tags that way. What’s happening is the custom title is showing with the “site title” tacked on. In the header.php, I have:
<title><?php wp_title(‘«’, true, ‘right’); ?> <?php bloginfo(‘name’); ?></title>
In the header.php, is there a condition I should change this to so the “site title” won’t show on Pages?
I tried hiding the site title through the CSS but that didn’t work. I’ve also tried removing the code in the header.php above but it ends up showing the URL for the title. Don’t think this happens on any other blogs I’ve done.
Thanks so much!
<?php if (is_page()): ?>
<title><?php wp_title(); ?></title>
<?php else: ?>
<title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<?php endif; ?>
Thanks Dan – that takes care of the pages. Sorry, I forgot to mention that I’d like the Site Title to show up for the blog. So the Page Title and then the Site Title for the blog only.
I noticed your code does the same thing as this code?
<title><?php wp_title('', true, 'right'); ?> </title>
Yes, an empty separator positioned to the right is the same as not specifying a separator.
Function Reference/wp title « WordPress Codex
I don’t know what you mean about the “for the blog” stuff. The code I gave you only changes your title structure for pages. Anything other than pages (like blog posts and archives) have whatever titles they had before.
Cool. Thanks Dan. Got it.