Displaying the image descriptions on attachment page 8

Note : This snippet applies to Customizr version 3.1.x and below. It may not work with version 3.2+. Use with caution on 3.2+ and check the availability and type of the hooks in the Customizr hooks API.

The following code will display the description text field of any attachment at the bottom of the attachment page.

Copy and paste this snippet at the very bottom of your functions.php file. (if you are using a child theme, don’t forget to start your functions.php file with <?php )



  • Works great!

    I found this (http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users) that explains how you can turn this into a plugin.

    I was wondering if the description could be centered under the image. it currently shows the image centered on the page and the description to the left.

    I am also trying to get the description to have a space between the image and description.

    I am fiddling with the code but haven’t got it figured out yet.

    Glad I found this!

    • Thanks for this feedback Dwayne

  • Dinch

    Doesnt work for me. If i add this to the bottom of the functions.php then i get this error message:Parse error: syntax error, unexpected ‘}’ in /homepages/30/d393651867/htdocs/store/wp-content/themes/shoppress/functions.php on line 535

    Any ideas?

  • I’ve tried this snippet only it appeared as a plain text. The bullets won’t shown up. There’s no box and the appearance wasn’t good.
    Please just update Customizr theme so that the image description would appear on attachment page like it used to.

  • Hi Azkajune,

    In the snippet, replace this line :

    By this one :

    This should now display html tags.
    Hope this helps

  • thank you perfect blog 😉

  • Geoff

    Howdy all and many thanks Nicolas for the fix, worked great with one caveat: html in the text has no impact on the way the text displays. If I remove the closing bracket as in your last reply to Azkajune, it gives me a parsing error. Any ideas? cheers, G.