• From where i can set the title it gives to the pages where it shows the full sized images?

    Right now it seems to make them by adding together
    (the post title where the image is) + (the image title) + (the blog title) which is a bit too much and if all 3 are on the same topic might look like keyword stuffing.

    Plug-ins like All in one SEO pack, doeosn’t seem to have control over that particular page title.
    I’m also unable to find a template dedicated to just that page.

    I’m lost

Viewing 15 replies - 1 through 15 (of 19 total)
  • Try looking for attachment.php or image.php.

    Thread Starter Fking

    (@fking)

    odd but i don’t have neither of both in my template (socrates)

    Thread Starter Fking

    (@fking)

    and few other templates i checked, templates with those names don’t exist ??

    They are optional. WordPress will fall back to using index.php if they don’t exist. The Twenty Ten theme has an attachment.php template file that you could use as an example to build a similar template for your theme.

    Thread Starter Fking

    (@fking)

    Thank you so much! I’ll look into that!

    Thread Starter Fking

    (@fking)

    the only place where i can find reference to the <title> tag is header.php

    and won’t editing that affect all the other titles on the site? ??

    What title are you talking about? The title in the browser tab? Or the displayed name of the image within the page?

    Thread Starter Fking

    (@fking)

    The title in the browser tab, the one determined by the <title> </title> tag

    In that case, you need to examine the code that is generating the <title> in header.php and possibly add the is_attachment conditional.

    Thread Starter Fking

    (@fking)

    ah i don’t even have is_attachment in the header.php in this theme ??

    I don’t see it in twentyten’s header also, but i guess that’s because it has attachment.php?

    It’s just that your theme appears to be something slightly funky when creating the <title>. Twenty Ten doesn’t, so it doesn’t need a special case for attachments.

    Thread Starter Fking

    (@fking)

    yeah, so i guess the best i could do is add is_attachment condition to the header of my theme?

    Along with some code that will generate the image/attachment <title> that you want, yes.

    Thread Starter Fking

    (@fking)

    here is what i have for title in my header.php file

    <title><?php $metaSettings = get_option("metaSettings"); if(is_home()) { if($metaSettings['sitetitle'] and $metaSettings['sitetitle'] != '') {echo $metaSettings['sitetitle'];} else {bloginfo('name'); }} else { the_title(); }?></title>

    i want to add condition for is_attachment, and set custom title when the page is attachment page, what would be the right way to do that?

    Thank you!

    Looking at that code, your pages – including image attachment pages – will only display the post/image title.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Controlling the title of the pages with images’ is closed to new replies.