• I have a blog at https://www.chakallas.com/ and if i see the title closely using view – > source, there are two spaces at the start of the title. I am using a seo plugin, even if i deactivate the plugin the two spaces still remains. Any idea how to remove that ?
    Yes i have checked i have not added spaces to every post’s title and the title code looks like as given below

    <!– Title and External Script Integration –>
    <?php
    global $bbpress_forum;
    if($bbpress_forum ):?>
    <title><?php bb_title() ?></title>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Post titles or site title? Either way I see this

    <h1 class="site-title"><a class="home" href="https://www.chakallas.com/" title="Home">SEO Blog</a></h1>

    and

    <h2><a href="https://www.chakallas.com/2011/01/25/how-to-advertise-on-sulekha/" rel="bookmark" title="Permanent Link to How to Advertise on Sulekha">How to Advertise on Sulekha</a></h2>

    No spaces.

    Also this doesn’t hurt anything even if they are there.

    Thread Starter chakallas

    (@chakallas)

    Post Title is still with extra unwanted spaces
    See this

    <title> How to Advertise on Sulekha</title>

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    AH! That’s not the post title. That’s the title attribute (yeah, let’s be even MORE confusing)

    On your front page it’s fine: <title>SEO Blog</title>

    On your posts, you’re right: <title> How to Advertise on Sulekha</title>

    This code…

    <!-- Title and External Script Integration -->
    <?php
    global $bbpress_forum;
    if($bbpress_forum ):?>
    <title><?php bb_title() ?></title>

    I think it’s tossing the spaces on your NON bb_press pages. WHy is this there at all? Shouldn’t it just be calling the_title();?

    <!-- Title and External Script Integration -->
    <?php
    global $bbpress_forum;
    <title>
    if($bbpress_forum) {
     bb_title();
    }
    else {
      echo the_title();
    }
    </title>

    or something…

    Thread Starter chakallas

    (@chakallas)

    yes you are correct i should have said title attribute. i changed it to <title><?php the_title() ?></title>
    and it is still the same <title> How to Advertise on Sulekha</title>

    seems like wordpress itself is adding the extra spaces or it might the theme that is the culprit?

    Will try to do string manipulation and theme changing and will post again

    Thread Starter chakallas

    (@chakallas)

    yeah the selected theme is the culprit, changed the theme and it worked fine

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Remove Spaces from Blog's Title’ is closed to new replies.