• Hello. I was wondering what is the exact code to be able to get the title on the attachment image page. Here is the code I have right now in my image.php file for the title portion.
    <h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?> </a><?php echo ' &raquo;' . $attachment->post-title; ?></h2>

    So I want it to show the main post title then the double right arrow and then the single image title but the $attachment->post-title is not the correct command for this.

    I am trying this on my test site. Here you can see the exactly what I am referring to. http://pandafeed.net/gave-her-a-bath-and-tucked-her-in-she-passed-out-right-away/thumbnail-for-1407/

    Thanks in advance

  • The topic ‘Get attachment image title’ is closed to new replies.