Title: Overriding gallery shortcode
Last modified: February 4, 2020

---

# Overriding gallery shortcode

 *  Resolved [leapedalea](https://wordpress.org/support/users/leapedalea/)
 * (@leapedalea)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/overriding-gallery-shortcode/)
 * The gallaery looks great, but I had some [gallery]‘s at posts (with no ids) becauses
   the default behaviour was to take all media uploaded to that page, which is not
   the same for meow. Looks awesome and would’ve loved to use it, but it breaks 
   90% of my site.

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

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/overriding-gallery-shortcode/#post-12399819)
 * Hi [@leapedalea](https://wordpress.org/support/users/leapedalea/),
 * Actually, I don’t understand the issue 🙂 You mean you already have the standard
   gallery shortcodes, but that when it is empty, the Meow Gallery breaks? I would
   love to help but I need to understand a bit.
 * That said, yes, the Meow Gallery does override the standard gallery. I could 
   write an option so that it does its own shortcode (it actually has its own too),
   but it was meant to replace easily the default one.
 *  Thread Starter [leapedalea](https://wordpress.org/support/users/leapedalea/)
 * (@leapedalea)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/overriding-gallery-shortcode/#post-12407557)
 * The default behaviour for the WP gallery shortcode is that in abscence of ID’s,
   it picks every image uploaded to that post. So [gallery] (just like that) in 
   fact does print out a gallery for a lot of my posts. But your [gallery] doesn’t,
   because it doesn’t replicate this behaviour.
    I think it’s be better that it 
   could be optional to use the same shortcode, because I want my old galleries 
   to remain the same.
    -  This reply was modified 6 years, 4 months ago by [leapedalea](https://wordpress.org/support/users/leapedalea/).
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/overriding-gallery-shortcode/#post-12412292)
 * Hi [@leapedalea](https://wordpress.org/support/users/leapedalea/),
 * > The default behaviour for the WP gallery shortcode is that in abscence of ID’s,
   > it picks every image uploaded to that post.
 * Actually, I have to admit I didn’t know that 🙂
 * > I think it’s be better that it could be optional to use the same shortcode,
   > because I want my old galleries to remain the same.
 * That’s a bit difficult to change the default shortcode, as it it supposed to 
   replace the defaults gallery when active.
 * I just released a new version of the plugin that does exactly what you say, and
   use the attached media entries when the gallery is empty. I hope that will fix
   the issue 🙂
 *  Thread Starter [leapedalea](https://wordpress.org/support/users/leapedalea/)
 * (@leapedalea)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/overriding-gallery-shortcode/#post-12426872)
 * Thanks for the quick response! (and sorry for the lateness of mine).
    But I’m
   still seing “Meow Gallery: The gallery is empty.” when I’m using [gallery]
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/overriding-gallery-shortcode/#post-12436250)
 * Are you sure the Media entries are attached to that post? How do you attach those
   entries to the post exactly? I just want to make sure.
 * This new version really works with Media entries attached to the post, which 
   is represented by the “Uploaded To” column in the Media Library.

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

The topic ‘Overriding gallery shortcode’ is closed to new replies.

 * ![](https://ps.w.org/meow-gallery/assets/icon-256x256.png?rev=2791571)
 * [Meow Gallery](https://wordpress.org/plugins/meow-gallery/)
 * [Support Threads](https://wordpress.org/support/plugin/meow-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/meow-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meow-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meow-gallery/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/overriding-gallery-shortcode/#post-12436250)
 * Status: resolved