WordPress.org

Support

Support » Themes and Templates » raquo (») in title WordPress theme wouldn’t go away

raquo (») in title WordPress theme wouldn’t go away

  • design_dolphin
    Member

    @design_dolphin

    This one threw me for a loop.

    I was editing a WordPress theme (Subtle by Glued Ideas), and I kept getting a “»” in the page title of the browser:

    header.php

    <title><?php if ( is_single() ) { ?> <?php } ?> <?php wp_title(); ?></title>

    Adding two single quotation marks in the parentheses of wp_title solved it:

    header.php

    <title<?php if ( is_single() ) { ?> <?php } ?> <strong><?php wp_title(”); ?></strong></title>

    Don’t know what is the original correct way, or if this is the correct way, but there ya go. 🙂

    Subject to peer review

Viewing 4 replies - 1 through 4 (of 4 total)
  • chaoskaizer
    Member

    @chaoskaizer

    Don’t know what is the original correct way, or if this is the correct way, but there ya go. 🙂

    yes 😉

    <?php wp_title(''); ?>

    Thanks, I did use that tip.

    However, here is the problem:

    I’d like to set a | between titles and name of blog, but ONLY when showing posts. That is, when people are on the front page, I don’t want to see that | before the name of the blog because it looks ugly.

    With <?php if ( is_single() ) { ?> <?php } ?> | <?php wp_title(''); ?> <?php bloginfo('name'); ?>

    or

    <?php if ( is_single() ) { ?> <?php } ?> <?php wp_title('|'); ?> <?php bloginfo('name'); ?>

    each time people are on my front page they see ” | <Name of my blog> “

    but if I do erase the | then there is no separator between title of blog and title of post for posts.

    Anyone could help me with this?

    Thanks!

    Jan Dembowski
    Volunteer Mod. & Brute Squad

    @jdembowski

    In my header.php (I use the Journalist theme) I have this line:

    <title><?php wp_title(' '); ?><?php if(wp_title(' ', false)) { ?> at <?php } ?><?php bloginfo('name'); ?></title>

    When someone is on the home page I just get my blog name. On single posts or pages I get ‘Post title at blogname’.

    Replace the separator word ‘at’ with ‘|’ and you should be good to go.

    Thank you very much! It works perfectly! Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘raquo (») in title WordPress theme wouldn’t go away’ is closed to new replies.