In 2.5, how do I set the page title to display the name of the post first then the blog name? Currently, it is the other way around with blog name first, then post title.
Thanks.
In 2.5, how do I set the page title to display the name of the post first then the blog name? Currently, it is the other way around with blog name first, then post title.
Thanks.
I use the Optimal Title plugin:
http://elasticdog.com/2004/09/optimal-title/
With this code in my theme:
<title><?php
if ( function_exists('optimal_title') ) {
optimal_title('|'); bloginfo('name');
} else {
bloginfo('name'); wp_title('|');
}
if ( is_home() ) {
echo ' | ';
bloginfo('description');
} ?></title>The codex offers some background infos as well: http://codex.wordpress.org/Template_Tags/wp_title scroll down for Separator with Blog Name and Title Reversed.
Ah hah! I had not seen that new $seplocation parameter in 2.5.
My new code (no plugin needed):
<title><?php
wp_title('|', true, 'right');
bloginfo('name');
if ( is_home() ) {
echo ' | ';
bloginfo('description');
} ?></title>It is ever a good Idea to keep the amount of plugins as low as possible.
This topic has been closed to new replies.