Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to customize how my gallery shortcode works. eg. have a div for showing the image then a list of thumbnails at the bottom or side?

Or perhaps I can create a custom template file to loop through my page's gallery images?

share|improve this question
    
Check out some of the related questions(on the right of this page, scroll down a little), i know i've answered at least one question about modifying the gallery shortcode. –  t31os Mar 8 '11 at 12:29
add comment

2 Answers

up vote 0 down vote accepted

You may complete override your gallery shortcode using the filter post_gallery. The return is displayed in your page and no further processing of the shortcode is done.

You may iterarate through the image attached to your post to build your own gallery.

See the implementation of gallery shortcode here: http://core.trac.wordpress.org/browser/trunk/wp-includes/media.php#L758

EDIT: There are some plugins that modify the default behaviour of the gallery shortcode. Search it from the "Add New Plugin" of the backend. Use the string "gallery shortcodes".

Note: if you want you can use nextgen-gallery to manage your photos. It has numerous plugin to display with other gallery, like Smooth Gallery, Nivo Slider or jQuery cycle.

share|improve this answer
add comment

I would recommend the Attachments plugin instead of using the gallery, it uses the regular wordpress media library, but you can control the output much more easily. If you pair it up with add_image_size you can create a range of different thumbnails.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.