Support » Fixing WordPress » Editing Title Tag

  • Below I pasted what I currently have generating my title tag. It puts in the page or link name. Not very useful if the page name is “contact info”. Is there any way I can stick the phrase “Connecticut Photographers” before the page name? For example if the page name was “contact info”, the title tag would read “Connecticut Photographers Contact Info”

    –current title tag–

    <title>
    <?php if (is_home () ) {
    bloginfo(‘name’);
    } elseif ( is_category() ) {
    bloginfo(‘name’); echo ” – “; single_cat_title();
    } elseif (is_single() || is_page() ) {
    single_post_title();
    } elseif (is_search() ) {
    bloginfo(‘name’); echo ” search results: “; echo wp_specialchars($s);
    } else { wp_title(”,true); }
    ?>
    </title>

Viewing 5 replies - 1 through 5 (of 5 total)
  • if you simply go to options in the wordpress admin area, you can type in what you want the blog’s title to be.

    Yes, but then the title gets written over my banner graphic. I just want it to appear in the title tag.

    Right, leave the title in the “head” as is and remove (or comment out) the tag in “header” which echoes the blog title.

    Couldn’t you just put:
    echo "Connecticut Photographers";
    before the single_post_title?

    I should have read your code more closely but your “written over” post made me think you were confusing two separate issues. I’d have the blog name on every page and comment out the php that displays the blogname in the header so it doesn’t “write over” your graphic.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Editing Title Tag’ is closed to new replies.