How to control the page titles when using the WordPress gallery?

Discussion in 'Blogging' started by Fking, Jun 28, 2011.

  1. Fking

    Fking Regular Member

    Sep 4, 2009
    Likes Received:
    If you use the Wordpress built-in gallery option to insert bunch of images together into post, you might have stumbled upon the following problem.

    When making the gallery, if you have selected the thumbs to go to "attachment page" instead of to the image directly. (Which means that it opens the full sized image in a page instead the image directly.) You might have noticed that the <title> </title> tag of this page is something like:

    <title>The title of the post - the title of the image - the title of the blog. </title>

    Which is quite long, and if both 3 are on the same topic, it might look like keyword stuffing.

    So i'm looking for a way to make Wordpress show just the title of the image in the <title> </title> tag of those attachment pages!

    Infact, i'm willing to paypal $20 to the one who give me the solution!

    things that i've tried that don't work
    - getting the original header.php code for the titles from the twentyten theme and replacing it in my current theme > it still outputs the same, so doesn't seem like it's controlled from there.
    - adding attachment.php page, copied the original one from the twenty ten theme and added to my current theme, it changes the layout of the page but NOT the title
    - plug-ins like All in One Seo Pack controll all the other pages titles but NOT the attachment page