Support » Fixing WordPress » i got rid of raquo in title tag but now there is space

Viewing 14 replies - 1 through 14 (of 14 total)

    Umm, there’s no need to go editing core files. The function itself is configurable. » is just the DEFAULT. You can use anything you want.

    Example: here’s “ :: ” being used:

    i don’t think you understand my question. i don’t want to use any character between anything for the title tag. i want to remove all of the character. as you can see here there is a space in the begining of the title tag.
    <title> Hello world! Hiking Resource</title>

    in the header.php file the title tag look like this
    <title><?php wp_title(); ?><?php bloginfo(‘name’); ?></title>

    what do i do to get rid of the first 2 space?

    Does this not work?

    <title><?php wp_title(''); bloginfo('name'); ?></title>

    nope it does not work. i think there’s another file somewhere but i looked everywhere and can’t figure it out

    actually when you look at the code on firefox and internet explorerer there is 2 space after the <title>

    Yes, but that’s only in the code. It doesn’t actually show up at the top of your browser or in your favorites/bookmarks. Try it for yourself. Having spaces in HTML is fine and it won’t show up.

    I mean, you could even have this:

    Escape to Virginia Beach
    Top Retreat

    And it’ll still show up on one line. 😉

    yes but i think search engine look at it like you see on the browser code with 2 space which is not good for SEO

    same problem here, if anyone comes up with a solution, please, we are waiting…


    I just solved the problem by using these instead:

    anyone found a solution to this?

    Well, it’s not pretty, but you can remove the leading spaces by editing the template-functions-general.php file.


    $prefix = '';
    if ( isset($title) )
    $prefix = " $sep ";


    $prefix = '';
    if ( isset($title) )
    $prefix = "";

    This has been verified to work in version 2.0.3.

    what makes you think google et al would bother indexing whitespace? that would make for gigabytes of truly meaningless content … especially given some of the shocking HTML that some engines generate 😉

    i really don’t think whitespace in your title tag is that likely to affect your ratings

    if you don’t believe me, view source on this comment 🙂

    I used ardamis fix, with one difference: instead of completely eliminating the $sep variable, I just eliminated the spaces to either side.

    So, I changed:

    $prefix = '';
    if ( isset($title) )
    $prefix = " $sep ";


    $prefix = '';
    if ( isset($title) )
    $prefix = "$sep";

    My title tag now looks like this:

    <title><?php if ( is_single() ) { wp_title($sep = ''); ?> :: <?php } ?><?php bloginfo('name'); ?></title>

    This gets rid of the extra space and adds a “::” after the title of your post, while maintaining no spaces between “<title>” and your blog name if it is your main page.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘i got rid of raquo in title tag but now there is space’ is closed to new replies.