WordPress.org

Ready to get started?Download WordPress

Forums

raquo (») in title WordPress theme wouldn't go away (5 posts)

  1. design_dolphin
    Member
    Posted 5 years ago #

    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

  2. chaoskaizer
    Member
    Posted 5 years ago #

    Don't know what is the original correct way, or if this is the correct way, but there ya go. :-)

    yes ;)

    <?php wp_title(''); ?>
  3. baal666
    Member
    Posted 5 years ago #

    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!

  4. 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.

  5. baal666
    Member
    Posted 5 years ago #

    Thank you very much! It works perfectly! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic