• osu9400

    (@osu9400)


    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    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>

    hakre

    (@hakre)

    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.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    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>

    hakre

    (@hakre)

    It is ever a good Idea to keep the amount of plugins as low as possible.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do I set title to “Post Title >> Blog Name”’ is closed to new replies.