Title: center aligning gallery items
Last modified: August 20, 2016

---

# center aligning gallery items

 *  Resolved [jedimasta](https://wordpress.org/support/users/jedimasta/)
 * (@jedimasta)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/center-aligning-gallery-items/)
 * Is there a shortcode override occurring if I’m using File Gallery? I’m trying
   to get my images to center align in the frame, but after editing the media.php,
   whether to accept additional shortcode variables or hardcoding the alignment,
   I found that I can completely remove the shortcode function for the gallery and
   the images still display.
 * Does File Gallery now control the gallery shortcode or am I missing something
   else entirely?

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

 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/center-aligning-gallery-items/#post-2208132)
 * **[@jedimasta](https://wordpress.org/support/users/jedimasta/):** yes, File Gallery
   takes over the gallery shortcode, but you can disable it on the media settings
   screen (section “File Galley”, first option – “Disable ‘File Gallery’ handling
   of [gallery] shortcode?”) and use it only in backend, if you like.
 *  Thread Starter [jedimasta](https://wordpress.org/support/users/jedimasta/)
 * (@jedimasta)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/center-aligning-gallery-items/#post-2208133)
 * I don’t mind, I just want to make some modifications. Any idea what file I should
   be looking at to add an alignment flag?
 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/center-aligning-gallery-items/#post-2208141)
 * You could maybe try adding a class to gallery container element (using the “gallery
   class” field within File Gallery) and then using CSS to align images.
 * If you wish to modify/add attributes to the shortcode in the File Gallery plugin,
   take a look at the `file_gallery_shortcode()` function in the `includes/templating.
   php` file.

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

The topic ‘center aligning gallery items’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/file-gallery_fdfbfb.svg)
 * [File Gallery](https://wordpress.org/plugins/file-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/file-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/file-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/file-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/file-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/file-gallery/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Aesqe](https://wordpress.org/support/users/aesqe/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/center-aligning-gallery-items/#post-2208141)
 * Status: resolved