WordPress.org

Ready to get started?Download WordPress

Forums

Editing Title Tag (6 posts)

  1. csilkman
    Member
    Posted 8 years ago #

    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>

  2. TonyWright
    Member
    Posted 8 years ago #

    if you simply go to options in the wordpress admin area, you can type in what you want the blog's title to be.

  3. csilkman
    Member
    Posted 8 years ago #

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

  4. Beel
    Member
    Posted 8 years ago #

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

  5. MichaelH
    Member
    Posted 8 years ago #

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

  6. Beel
    Member
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags