Please Help With WP Title structure

Discussion in 'WordPress' started by Malmsteen, Jun 10, 2008.

  1. #1
    Im using this theme that didnt display the title of each page the way I wanted it to be displayed. It was originally like this: "Blog Title" > "Post Title",

    but I want it to display like this instead:
    "Post title" | "Blog Title". I tried to copy the title code from one other theme, but that didnt work right. It still displays ""Blog Title" > "Post Title"".

    Now here is the code for that I use right now:
    <title><?php if ( function_exists('optimal_title') ) { optimal_title('|'); bloginfo('name'); } else { bloginfo('name'); wp_title('|'); } ?></title>
    Code (markup):
    This was taken from a different WP theme though.. But anyone please help me, how do I make my title structure like this now: "Post title" | "Blog Title"
    for every post, "Home page" should only disply "blog title".

    Please ask if you didnt understand, and I really hope I get an answer to this :confused:
     
    Malmsteen, Jun 10, 2008 IP
  2. UseShots

    UseShots Peon

    Messages:
    244
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you don't want to modify themes yourself, you can try the All-in-one-SEO plugin. It overwrites title with whatever you need. No coding required.
     
    UseShots, Jun 10, 2008 IP
  3. Malmsteen

    Malmsteen Peon

    Messages:
    970
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    UseShots, I do use All-in-one-Seo. I give eash post its own title the way I want it, but it still displays: "Blog Title" > "Post Title" , so I think I will need to modify the code in the header file still. Please give me the right code for this, anyone???
     
    Malmsteen, Jun 10, 2008 IP
  4. UseShots

    UseShots Peon

    Messages:
    244
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Do you have the "Rewrite Title" option checked in the All-in-one-SEO settings?
    If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them.

    Anyway, here is the code:

    <title><?php wp_title(); ?> | <?php bloginfo('name'); ?></title>
    PHP:
     
    UseShots, Jun 10, 2008 IP
  5. susan8051

    susan8051 Peon

    Messages:
    1,358
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The option is there in All in One SEO's settings.. see this pic

    [​IMG]

    hope this helps.. :)
     
    susan8051, Jun 10, 2008 IP
  6. Malmsteen

    Malmsteen Peon

    Messages:
    970
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    A big thanks guys and girls. I figured it out finally :D I was using the All-in-one-Seo plugin correctly and everything, but I noticed it didnt rewrite titles, so I then undestood that the maker of the wp design, had placed the title tags too far down in the header file. All is well now anyway =)
     
    Malmsteen, Jun 10, 2008 IP