Wordpress Title Question

Discussion in 'WordPress' started by kelp, Jun 21, 2007.

  1. #1
    Hello folks!
    In wordpress, how would I get the following title on my single posts:
    Category Name: Post Title
    <title><?php if(is_home()) { bloginfo('title'); } else { echo 'Variable here:'; wp_title(''); echo ''; echo ''; } ?></title>
    Code (markup):
    See, my code is right for the homepage, but for the single posts, I'm not sure what the variable is in Wordpress to make it the actual category. I just stuck something that says "Variable here", but I need the code that will display the post's category. What's the variable for that?
     
    kelp, Jun 21, 2007 IP
  2. Jim bob 9 pants

    Jim bob 9 pants Peon

    Messages:
    890
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <title><?php wp_title(); { echo ' - '; } bloginfo('name');  ?></title>
     
    PHP:
    Try that
     
    Jim bob 9 pants, Jun 21, 2007 IP
  3. kelp

    kelp Peon

    Messages:
    306
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, that displays the title of the whole site. I'm looking to have only the category title, like so:
    Category Title: The post title
     
    kelp, Jun 23, 2007 IP
  4. cormac

    cormac Peon

    Messages:
    3,662
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #4
    cormac, Jun 23, 2007 IP
  5. ravish_83

    ravish_83 Peon

    Messages:
    221
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    WOW...!

    SEO title tag plugin is too good :D
     
    ravish_83, Jun 24, 2007 IP