Support » Themes and Templates » wp_title displaying more than the title…

  • I use the Evidens theme on my blog ( In the header php file it has “<title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>” for the titles of pages. As you can see, if you go to a single post it shows the blog name, a “»” tag, and the title of the post. However, I don’t want to » tag. How do I remove it?

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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 &raquo; 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…

    Hi, try wp_title(”,true)

    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



    Forum Moderator

    Or use something like wp_title('|',true,'right')

    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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘wp_title displaying more than the title…’ is closed to new replies.