WordPress.org

Ready to get started?Download WordPress

Forums

How to get attachments description when viewed via attachments.php (3 posts)

  1. hilj
    Member
    Posted 4 years ago #

    How can I show the attachment description (and for that matter the title and caption too) together with the attachment?

    I managed to do it when viewing all the attachments (as a thumbnail grid) via page.php, but not when I'm viewing individual pictures via attachment.php.

    Would be cool to ad some info about the picture there, you know.

    Found few nice articles about it but I didn't manage to do it.
    This: http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/

    Anti this: http://www.somethinginteractive.com/index.php/2009/07/23/get-images-captions-titles-for-images-attached-to-posts/

    Thanks! All help appreciated!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Just try adding <?php the_content();?> where you would like the description to display in attachment.php.

  3. hilj
    Member
    Posted 4 years ago #

    Wow that worked! How simple :) Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic