Hi AndrewBanchich.
A straightforward solution would be to replace the contents between the <title> tags with the following:
<?php if ( is_single() ) { echo get_bloginfo('name') . ' | ' . wp_title(); } else { echo get_bloginfo('name') . ' | ' . get_bloginfo('description'); } ?>
The above code will print the title as “BLOG NAME | POST TITLE” for single post pages and “BLOG NAME | BLOG DESCRIPTION” for all other pages. This IF statement can be expanded upon using other WordPress conditional tags.
I hope this helps. 🙂
Wouldn’t that still show the »? It seems as though the theme creator put the » sign into the wp_title tag somehow, so it shows up wherever you have the wp_title tag.
If you look through the functions.php file, is there anything that calls wp_title()? Possibly an add_action() with it in?
If you search through your theme’s functions.php file (an any files linked to it via a require() or include() statement) and comment out any lines with wp_title() in them, that should, as I understand it, resolve this.
This is the first time I’ve seen this issue, so I’d imagine it’s a customisation within the theme you’re using.
🙂
I looked there at first and there was nothing about wp_title
Is there any reference to »
at all? Perhaps in single.php as that’s where the page is treated differently?
None whatsoever. I did a Command+F on it and nothing showed. Is there some deeper file that wp_title pulls the info from? It could be there…
I managed to get this to work using a combination of mattyza and killermaniac’s code.
For the article title immediately following the blog title:
<?php if ( is_single() ) { bloginfo(‘name’) ?> <?php wp_title(“”,true); } else { echo bloginfo(‘name’) ?> <?php bloginfo(‘description’); } ?>
To use other separators in place of » such as | just place them between the ?> <?php
Or use something like wp_title('|',true,'right')
http://codex.wordpress.org/Template_Tags/wp_title
I’d like these options, how do I get item #2?
1) on a category page
Category title | Site Name
2) on a single page
Page Name | Category title | Site name