Look what I want to do... I want to edit < title > < /title > from < head > < /head > on attachment page.

Right now I have like this: POST PARENT TITLE (no - or | here ) IMAGE TITLE - MY BLOG TITLE

I want to show like this IMAGE TITLE | MY BLOG TITLE

How can I do this? I really want to do it. in ALl in one seo pack is not this option..


  • you can use AIO wordpress plugin like me with tutorial right here – user17202 Jun 17 '12 at 5:51

I believe that attachment.php is the template for attachment pages. So you can edit existing one or create new if you have none.

You can also create different templates for different mime types: http://codex.wordpress.org/Template_Hierarchy


Sorry, in a case you want to change HTML page title, you may want to use is_attachment() in header.php of your theme.

Something like this:

<title><?php if( is_attachment() ) { ... } else { ... };?></title>
  • Is not good.. i want title of the page in The PAGE TAB not in as post title.. that i can do it. – user10416 Nov 20 '11 at 7:54
  • @user10416 I've updated my answer – brownian Nov 20 '11 at 12:10
  • Something like <title><?php if( is_attachment() ?> <?php the_title(); ?> <?php else ?> <?php wp_title(); ?> <?php endif; ?></title> – user10416 Nov 20 '11 at 14:03
  • @user10416 :-) feel free to add your own answer and accept it – brownian Nov 20 '11 at 18:15
  • it's not good my answer... – user10416 Nov 20 '11 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.