Displaying the image descriptions on attachment page 7

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 )



  • http://dwaynehaskell.com Dwayne

    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!

    • http://www.presscustomizr.com/ Nicolas

      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?

  • http://casio-tumbashop.com Azkajune

    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.

  • http://www.presscustomizr.com/ Nicolas

    Hi Azkajune,

    In the snippet, replace this line :

    By this one :

    This should now display html tags.
    Hope this helps

  • http://www.sohbeti.org Sohbeti

    thank you perfect blog 😉