Forums

[resolved] Insert image's "description" into "image.php" template (3 posts)

  1. think2wice
    Member
    Posted 3 years ago #

    I know the template tag to insert an image's caption into the image's attachment template (image.php), but how do you insert text from the description field into the template?

  2. Otto
    Tech Ninja
    Posted 3 years ago #

    The description can be shown by using the_content(), just like the caption can be shown by using the_excerpt().

    An attachment is just a special form of post. So the image.php should be like every other post template, and have a Loop and everything. The normal Loop functions then show what you need.

  3. think2wice
    Member
    Posted 3 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic