WordPress.org

Ready to get started?Download WordPress

Forums

Want one title for home, other title for everything else (7 posts)

  1. ccano
    Member
    Posted 7 years ago #

    Hi, for my home page (index.php), I want to show a title like this:

    My Blog Name - my blog's slogan here

    but for every other page/post I want to show

    (wp title) | My Blog Name

    How can I do this? Thanks in advance.

    Chris

  2. ccano
    Member
    Posted 7 years ago #

    I'm sorry I accidentally posted this in the Installation category.

  3. moshu
    Member
    Posted 7 years ago #

    [don't worry: moved]

  4. Chris_K
    Member
    Posted 7 years ago #

    Check out Conditional_Tags.

    In your theme's header, you could use is_home(), for instance.

  5. ccano
    Member
    Posted 7 years ago #

    Thanks HandySolo. I tried using is_home() but I'm not sure how to incorporate that into the title for lack of programming skills I suppose.

    Could you elaborate? I appreciate it.

    Thanks,
    Chris

  6. alainS
    Member
    Posted 7 years ago #

    Something like that:

    
    <title>
    <?php if is_home()
    { bloginfo('name'); blabla slogan }
    else
    { wp_title(); bloginfo('name');}
    ?>
    </title>
    
  7. ccano
    Member
    Posted 7 years ago #

    Thanks but I get this error when I insert that in between my title tags:

    Parse error: syntax error, unexpected T_STRING, expecting '(' in /home/... in line 6

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags