Title: Using image title &amp; description
Last modified: August 19, 2016

---

# Using image title & description

 *  [transmothra](https://wordpress.org/support/users/transmothra/)
 * (@transmothra)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/)
 * I’m going crazy trying to find relevant info on this subject:
 * I want to use the image title and description in posts. I don’t want to simply
   iterate through images and display them as a gallery; i want to use the image
   where it was placed in the body of the post. How do i create a loop that uses
   the image title and description, and still keeps the images where they were inserted
   within the post content?
 * Thanks tremendously for any suggestions….

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585038)
 * [http://codex.wordpress.org/Function_Reference/get_children](http://codex.wordpress.org/Function_Reference/get_children)
   
   [http://codex.wordpress.org/Template_Tags/get_posts#Show_attachments_for_the_current_post](http://codex.wordpress.org/Template_Tags/get_posts#Show_attachments_for_the_current_post)
 *  Thread Starter [transmothra](https://wordpress.org/support/users/transmothra/)
 * (@transmothra)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585055)
 * I got the feeling that that displays all the attachments at once. It doesn’t?
   They’re just inserted in the post content as normal?
 * You’ll have to pardon me, i’ve gotten awfully rusty with PHP over the last few
   years. Stupid WordPress and its plugins do everything for me and i practically
   never have to code anything anymore 😛
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585064)
 * Either of those two methods will grab all the attachments but they don’t actually
   display anything. Your additional code defines what to display and how.
 *  Thread Starter [transmothra](https://wordpress.org/support/users/transmothra/)
 * (@transmothra)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585127)
 * Oh, see that’s what i mean. How do i present a post with pictures as it would
   normally be, except with the extra image information? In other words, how do 
   i put the images where they are supposed to be in the context of the post?
 *     ```
       _title_
       |     | lorem ipsum blah blah blah
       |     | a bunch of text
       ------- quite a long story here
       descrip
   
       This is another paragraph _title_
       with more words in it    |       |
       about stuff and things   |       |
       like a normal post w/    ---------
       images embedded.          descrip
       ```
   
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585208)
 * If you just use `<?php the_content();?>`, the images will display as they were
   placed within the post or page.
 *  Thread Starter [transmothra](https://wordpress.org/support/users/transmothra/)
 * (@transmothra)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585216)
 * Yes, but see the example above. Instead of caption, i want to use the description,
   and i want to use the image name or title as an actual title above the image,
   like so:
 *     ```
       Dog Humping a Tuba    Lorem ipsum dolor sit amet.
       ------------------    Velit dictumst facilisis risus phasellus porta.
       |                |    Vel. Placerat et parturient etiam.
       |                |    Sit dapibus, egestas penatibus, aliquam.
       |                |    Sed, tortor magna, cursus. Integer.
       |                |    Urna. Parturient ut et sociis.
       |                |    Sagittis eu eu nec montes.
       |                |    Adipiscing nec placerat placerat porttitor.
       ------------------    Vel? Nunc, phasellus adipiscing eu.
       This one time at      Enim in parturient mid augue.
       band camp....         Sed, montes aliquet ridiculus diam.
                             Placerat? Augue, ac proin. Nec.
       Porta, magna cum, placerat montes cras elementum natoque egestas.
       Sagittis diam augue ac odio dolor, et proin.
       Nunc ridiculus egestas aliquet vel, tristique amet lacus.
       Pellentesque porta duis in! Magna, ac integer! Montes.
       Ut est nisi facilisis habitasse arcu vel! Amet.
       ```
   
 * Or, alternately, to display a gallery of images which include an image name and
   description, rather than no name and a caption.
 * The reason for this is that i’d like to reserve the caption as a shorter description
   of the image, and have a different page template using a longer description instead,
   and i’d like to pull the image name or title to use above the image to name it.
 * Does that make more sense?
 *  Thread Starter [transmothra](https://wordpress.org/support/users/transmothra/)
 * (@transmothra)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585267)
 * Am i not explaining this clearly enough…? If so, sorry. It seems clear to me 
   but maybe it’s not.
 *  Thread Starter [transmothra](https://wordpress.org/support/users/transmothra/)
 * (@transmothra)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585334)
 * Does anybody understand what i’m asking here?
 *  Thread Starter [transmothra](https://wordpress.org/support/users/transmothra/)
 * (@transmothra)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585366)
 * Anybody know what i’m talking about? Does any of this make any sense?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Using image title & description’ is closed to new replies.

## Tags

 * [attachment](https://wordpress.org/support/topic-tag/attachment/)
 * [description](https://wordpress.org/support/topic-tag/description/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [media](https://wordpress.org/support/topic-tag/media/)
 * [title](https://wordpress.org/support/topic-tag/title/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [transmothra](https://wordpress.org/support/users/transmothra/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/using-image-title-description/#post-1585366)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
