• Resolved think2wice

    (@think2wice)


    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    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.

    Thread Starter think2wice

    (@think2wice)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Insert image’s “description” into “image.php” template’ is closed to new replies.