How to set custom title for front page only in wordpress

Discussion in 'WordPress' started by jasonsc, Sep 30, 2008.

  1. #1
    I want to set up a custom <title> for the front page only and leave other pages behaving as they are now.

    Any idea how to do this??

    Thanks!!
     
    jasonsc, Sep 30, 2008 IP
  2. devilkitty

    devilkitty Peon

    Messages:
    303
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think it'd be something like a php if/else statement. So if homepage, display custom title. else display post slug.
    Sorry i dunno the code for ya :( .

    If all else fails, you could always try http://wordpress.org/extend/plugins/all-in-one-seo-pack/all-in-one-seo-pack.zip . It allows you to set keywords and a specific title for the main page.

    One of those two ways should achieve what your looking for.
     
    devilkitty, Sep 30, 2008 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It would help to know the title code. I'll assume it's the default code:
    
    <title>
       <?php if (is_front_page()) { ?>TITLETEXT<?php } else bloginfo('name'); ?>
       <?php if (is_single()) { ?> &raquo; Blog Archive <?php } wp_title(); ?>
    </title>
    
    Code (markup):
     
    Cash Nebula, Sep 30, 2008 IP
    jasonsc likes this.
  4. jasonsc

    jasonsc Well-Known Member

    Messages:
    1,696
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    165
    #4
    thanks!! You rock! Rep given!

     
    jasonsc, Sep 30, 2008 IP
  5. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #5
    install "ALL In one seo plugin" and use options tab for setting title, keywords, and description for blog homepage.
     
    Jalpari, Sep 30, 2008 IP
  6. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Cheers! :)

    All In One SEO is an awesome plugin, with over half a million downloads, but it's a bit much for just changing the title. Still, I think they will even integrate it into Wordpress sometime in the future, or at least add some of it's features.
     
    Cash Nebula, Sep 30, 2008 IP
  7. nandalinnaung

    nandalinnaung Peon

    Messages:
    920
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    fantastic, i shall install all-in-one SEO optimization plug-in too.

    cheers
     
    nandalinnaung, Sep 30, 2008 IP
  8. WebSolutions86

    WebSolutions86 Peon

    Messages:
    434
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #8
    u can also use the <?php if (is_home()); ?> statement
     
    WebSolutions86, Oct 1, 2008 IP