Title: [Plugin: Gallery] shortcode bug and fix
Last modified: August 20, 2016

---

# [Plugin: Gallery] shortcode bug and fix

 *  Resolved [sipiatti](https://wordpress.org/support/users/sipiatti/)
 * (@sipiatti)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-gallery-shortcode-bug-and-fix/)
 * Hi Developers,
 * there is a bug in the shortcode handling. It is a functional problem, not a coding
   problem. The function isw echoing instead of returning the output so the gallery
   is diplayed at the top of the page content instead of the exact place of the 
   shortcode.
    I made a quickfix with output buffering: after line `$gllr_options
   = get_option( 'gllr_options' );` (about line nr. 809 in gallery-plugin.php) I
   inserted `ob_start();` and at the end of the function (around line nr. 889) I
   inserted these two lines
 *     ```
       $gllr_output = ob_get_clean();
               return $gllr_output;
       ```
   
 * It works well, but maybe you desire another solution.
 * Anyway, I love the plugin, it is simple and clean exactly what I prefer.
 * Regards
    sipiatti
 * [http://wordpress.org/extend/plugins/gallery-plugin/](http://wordpress.org/extend/plugins/gallery-plugin/)

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

 *  Plugin Author [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-gallery-shortcode-bug-and-fix/#post-2784780)
 * Hello,
 * This bug has been fixed in version 3.06 (today).
 * Thank you,
    Oksana
 *  [VolkerHarz](https://wordpress.org/support/users/volkerharz/)
 * (@volkerharz)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-gallery-shortcode-bug-and-fix/#post-2784948)
 * the plugin site is offline 🙁 I cannot update
 * [http://wordpress.org/extend/plugins/gallery-plugin/](http://wordpress.org/extend/plugins/gallery-plugin/)
 *  Plugin Author [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-gallery-shortcode-bug-and-fix/#post-2784952)
 * Hello,
 * please do not worry, it will be available soon, we are working on it.
 * Sincerely.

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

The topic ‘[Plugin: Gallery] shortcode bug and fix’ is closed to new replies.

 * ![](https://ps.w.org/gallery-plugin/assets/icon-256x256.gif?rev=2580845)
 * [Gallery by BestWebSoft - Customizable Image and Photo Galleries for WordPress](https://wordpress.org/plugins/gallery-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gallery-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gallery-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/gallery-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gallery-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gallery-plugin/reviews/)

## Tags

 * [gallery shortcode](https://wordpress.org/support/topic-tag/gallery-shortcode/)

 * 3 replies
 * 3 participants
 * Last reply from: [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-gallery-shortcode-bug-and-fix/#post-2784952)
 * Status: resolved