• WordPress Gallery Plugin
    by ShibaShake

    The Shiba Gallery Plugin allows you to display a variety of javascript galleries within your WordPress blog. All you need to do is specify the type of gallery you want in your regular WordPress gallery shortcode.

    The Shiba Gallery is very flexible and can render post, page, and gallery objects, in addition to image attachments. This article describes some of the cool things that you can achieve with the Shiba Gallery.

    [gallery id="10" type="noobslide_galleria" ]

    [Most recent Shiba Gallery updates]

    February 15th, 2010 – Shiba Gallery 3.5

    New features in this release -

    • Gallery links. You now have the option to set your gallery links to file, attachment, or none.
    • Expanded WordPress captions. The standard WordPress caption shortcode has been expanded to deal with images and galleries.
    • Lytebox. The Lytebox gallery has been added back to the plugin because it resizes large images according to the browser screen whereas Slimbox does not.
    • Apostrophe in Titles. Galleries should function properly even if images have the apostrophe symbol in their titles.

    Below, I show three related articles using this simple gallery shortcode -

    [gallery type="noobslide_nativex" numberposts="3" related="1" size="thumbnail"]

    Related Articles

    More cool looking sample galleries.

    Javascript Galleries Supported

    Currently, the Shiba WordPress Gallery Plugin includes the following gorgeous Javascript libraries -

    • TinySlideshow by Michael Leigeber.
      Tiny Slideshow is a very slick looking inline gallery that allows users to scroll through the images, or enjoy them in an automatic slideshow mode.
    • [gallery id=10 type="tiny"]
    • NoobSlide from EfectoRelativo.net
      There is one word to describe the NoobSlide Gallery – Awesome!
    • If I had two words, I would say Simply Awesome!

      With NoobSlide you can easily combine together various gallery type components to create a range of compelling gallery styles.

      For example, to the right I have created a NoobSlide version of Galleria. At the bottom I have created a NoobSlide version of SlideViewer.

      [gallery id=10 type="noobslide_galleria"]
      [gallery id=10 type="noobslide_slideviewer"]
    • Slimbox by Christophe Beyls.
      Slimbox is an efficient version of Lightbox that is solely based on jQuery. Slimbox will now be used in place of Lytebox.
    • [gallery id=8162 type=slimbox size="(120,120)"]
    • Lytebox by Markus F. Hay.
      Lytebox is not as efficient as Slimbox but it will resize images that are larger than the browser screen.
    • [gallery id=8162 type=lytebox size="(120,120)"]
    • Popeye 2.0 Gallery by Christoph Schüßler.
      Popeye is an awesome inline gallery that allows you to expand images in-place. It also has some very well styled frames which we have also included in the Shiba Gallery Plugin.
    • [gallery id=10 type=popeye]
    • Picture Slides Gallery by Robert Nyman.
      The Picture Slides gallery has been added as an alternative thumbnail gallery to NoobSlide. If you do not want to load MooTools, then Picture Slides comes in handy as an efficient solution for showing thumbnail galleries as well as slideshows.
    • [gallery id=10 type="pslides"]
    • WordPress Native Gallery.
      The WordPress native gallery is also supported. Just specify the type as native.
    • [gallery id=10 type=native size="size(100,100)" link="file"]
    • Expanded WordPress Native Gallery.
      The previous expanded WordPress Native Gallery has been replaced with the NoobSlide NativeX gallery. It contains thumbnails just as before, but also has a nice preview image and description panel. This gallery is most useful when displaying post, page, or gallery objects.
    • Just specify the type as noobslide_nativex.

      [gallery id=1688 type="noobslide_nativex" size="thumbnail"]

    Custom Image Size

    You can specify the image size that you want using the standard WordPress gallery shortcode tags – full, large, medium, thumbnail. These sizes are set under Settings >> Media.

    Alternatively, you can also specify your own custom size.

    [gallery id="1969" type="galleria" size="(300,225)"]

    Shiba Gallery Plugin Expanded Short-Codes

    • category – List of comma separated category ids to include in the gallery.
    • [gallery category="109" type="nativex"]
    • tag – List of comma separated tag slugs to include in the gallery.
    • [gallery tag="tag-a,tag-b,tag-c"]
    • tag_and – Same as above except this allows you to perform an AND operation instead of an OR. It will only return images that contain ALL of the tags in your list.
    • [gallery tag_and="tag-a,tag-b,tag-c"]
    • recent – List of recent articles.
    • [gallery recent="1"]
    • numberposts – Number of objects to include in the gallery.
    • [gallery category="10" numberposts="15"]
    • page – Which page of gallery objects to show. It is used in conjunction with numberposts to enable gallery paging.
    • [gallery category="10" numberposts="5" page="2"]
    • frame – The type of frame to use for the gallery. Current frames include none, green, blue, gray, shadow, black, white, and border. Here are some example galleries with the different frames.
    • [gallery category="10" frame="green"]
    • caption – What to use as the image captions. Current caption options include none, title, description, or permanent. More detail on the different gallery caption options.
    • [gallery category="10" caption="description"]
    • link – What to use as the image links. Current link options include none, attachment, or file. More detail on the different link options.
    • [gallery category="10" link="none"]
    • post_type – The type of objects to include (post, page, gallery, attachment, or any).
    • [gallery category="109" type="nativex" numberposts="15" post_type="post"]

    Note -
    Only one of include, category, tag, recent, or id will be used. Include will be checked first, followed by category, followed by tag, and then recent. If none of these are set, id will be used.

    Shiba Gallery Default Options

    You can specify a default gallery type by going to Media >> Shiba Gallery.

    From this screen you may also set the default thumbnail picture, default frame, and default captions. There is also a check box in the Default Frame section that specifies whether this default frame should also be applied to images in your blog.

    The default gallery image will be used for posts and galleries that have no thumbnails assigned to them. If you do not have a default image, the plugin will just display an empty black image.

    Show Shiba Galleries in Your Widget Areas

    To show shiba galleries in your widget areas, simply enable gallery shortcodes for text widgets.

    // Add to the init function of your functions.php file
    add_filter('widget_text', 'do_shortcode');

    Call Shiba Gallery Directly from PHP

    If we want to call Shiba Gallery directly from PHP rather than use the WordPress gallery shortcode, we may do the following -

    global $shiba_gallery;
    echo $shiba_gallery->parse_gallery_shortcode("", array('id' => "10"));

    Shiba Gallery Plugin Updates

    • Shiba Gallery 3.3

      December 2nd, 2010

      This is a big release with many new features.

      • Gallery frames. You may now assign a variety of styled frames to your WordPress galleries and images.
      • Gallery captions. You may now turn gallery captions on and off, as well as show image titles and descriptions.
      • Gallery paging. The page attribute is now supported in the gallery shortcode. You may easily enable gallery paging by setting numberposts and page in your gallery shortcode.
      • Gallery default options. There is now a gallery options page under Media >> Shiba Gallery. This screen allows you to set default frames, gallery types, captions, and thumbnail.
      • New galleries. Some exciting new galleries have been added including Popeye 2.0, Picture Slides, and Slimbox.
      • Gallery javascripts are now loaded at the end of the page and only as needed. If no galleries are used, then no gallery javascripts will be loaded. This will help improve page efficiency.
    • Shiba Gallery Plugin 3.1

      April 6th, 2010
      Plugin has been modularized and all functions are encapsulated within wrapper classes.

      I have also integrated Shiba Gallery with the awesome YARPP plugin for showing related articles. By simply using the related tag in your gallery shortcode you may view YARPP results using any of the javascript galleries within the Shiba plugin.

    • Shiba Gallery Plugin 3.0

      The Shiba Gallery Plugin has been significantly enhanced in this release with the inclusion of NoobSlide; one of the most versatile, compelling, and well-constructed Javascript galleries I have come across.

      With NoobSlide, I was able to construct galleries that are similar in style to the previous Galleria, SlideViewer, and NativeX gallery types. Execution of galleries are now a lot faster, smoother, efficient, and clean.

      I have replaced -

      As a result, there is no longer any need for iframes, or background-image resizing operations. This makes the plugin faster, cleaner, and more secure.

    • February 15th, 2010 – Important Patch 2.7.3
      There is a Fatal error bug in the Shiba Gallery 2.7 release. This is due to a missing function in the plugin. I have fixed it in the latest patch 2.7.3. Please download this important patch.
      Many thanks to Jacob for detecting and reporting it so quickly.
    • Shiba Gallery Plugin 2.7
      You can now render post, page, and gallery objects using any of the gallery types. Some new gallery short-code options have been added to facilitate this new capability. We also expanded the WordPress native gallery and added it as a new gallery type (type=”nativex”).
    • Shiba Gallery Plugin 2.5
      Added the Slide Viewer javascript gallery by Gian Carlo Mingati. Added the ability to specify custom sizes for galleries.
    • Shiba Gallery Plugin 2.0
      Galleria now works on Google Chrome. It is Schweet!
    • Shiba Gallery Plugin 1.0
      Detailed description of the Shiba Gallery Plugin with examples.

    Future Additions

    If you are particularly impressed with a Javascript gallery, please let me know and I will look into including it within the Shiba Gallery Plugin.

    Please let me know if you encounter any bugs or compatibility issues. This will help me to improve the plugin and update the compatibility list above.

    Thanks to all the Javascript library authors for sharing their very awesome gallery scripts with us!

    Related Articles

    151 Comments
    1. Yaw Hunu

      i really like your plugin, Please is there a way to tweak your plugin for it to show images attached to post without inserting shortcode in post but use some single php tag in my THEME…? Thanks

      4:22 pm on January 29th, 2012 Reply
      • This renders the gallery using PHP-

        global $shiba_gallery;
        echo $shiba_gallery->parse_gallery_shortcode("", array('id' => "10"));

        Refer to the “Call Shiba Gallery Directly from PHP” section in the article above.

        9:01 pm on January 29th, 2012 Reply
    2. a quick question

      Is there a way to eliminate ( ?gallery= ) from the website links
      for instance my link at the moment reads

      http://www.shaunalexander.net/?gallery=advertising-photography

      but I prefer it to be

      http://www.shaunalexander.net/advertising-photography

      4:02 pm on January 1st, 2012 Reply
      • Go into Settings >> Permalinks.

        You can set your gallery permalink structure from there. However, you will probably need to put in a unique slug (e.g. ‘photo’) so that it doesn’t conflict with existing permalink structures, such as your page permalink structure.

        For example you can set your permalink to
        /photo/%gallery%

        Which means the address will be site/photo/advertising-photography

        3:19 pm on January 4th, 2012 Reply
    3. Hi Shiba,

      Awesome plugin – thanks for the work you put into this.

      I have a question – while using the slimbox option, is it possible to size the image that the slimbox displays? Also, it is possible to show only one thumbnail for a gallery but when clicked, the slimbox allows cycling through all the images in that gallery?

      Thanks much!
      -raaj

      4:40 pm on November 11th, 2011 Reply
      • I would check out the slimbox site to see if this is possible. Then you can edit shiba-slimbox.php to alter the HTML generated.

        11:41 am on November 22nd, 2011 Reply
        • Raaj

          Hi,
          Here’s what I mean to ask and goofed up :) -
          For any gallery of multiple images, is it possible to modify the code to display only one thumbnail (i.e only one image in the gallery display) but then when that thumbnail is clicked the the slimbox opens, the slimbox allows navigation through all the images in the gallery (like how the slimbox behave out of the box today).
          If you could even point me in the direction of where the thumbnails for each gallery are created in the code, so that I can find a way to display only one thumbnail, that would be awesome and much appreciated.

          Thanks much!
          -raaj

          12:23 pm on November 26th, 2011 Reply
    4. [...] gallery is generated with the [gallery] short code and created the effects/formatting with the Shiba Gallery plugin. Filed Under: [...]

      5:50 pm on October 24th, 2011 Reply
    5. Vadim

      Hello. Please help me to configure this plugin. I poprobyval much, but it never happened = ((I have WP 3.2.1 I beg you to send e-mail here or detailed instructions on setting up.

      3:43 pm on October 19th, 2011 Reply
      • Hello Vadim,
        If you let me know what specifically you are having problems with, I can help to troubleshoot the situation. Otherwise, all the relevant instructions should be on this page.

        2:35 pm on October 21st, 2011 Reply
    6. james

      hi shiba,you have a very cool plugin.I was wandering whether is it possible if i want to integrate the plugin into the wordpress theme directly?

      8:47 pm on September 22nd, 2011 Reply
      • Hello James,
        I am not sure why you would want to do that since the gallery functionality is independent of theme components. A theme can certainly take advantage of the plugin by checking if it is available and using some of its inbuilt functions. However, it seems that integrating gallery rendering into a theme would only overload the theme.

        In general, I am a big proponent of slimmer themes, so that users have greater flexibility in picking and choosing what functions they want to include or exclude through plugins.

        11:14 am on September 23rd, 2011 Reply
    7. [...]
      WordPress Gallery Plugin | Comment Page 2 [...]

      11:34 am on September 12th, 2011 Reply
    8. Hi Shiba
      “Theme credit links are expected to go to the theme author. I don’t see how a site about dog tips, care and training falls into that category.”

      What a shame, but it’s still a great plugin.

      7:26 am on September 11th, 2011 Reply
    9. peyman

      First of all, this is a huge plugin, thanks.
      Second is it possible that this plugin conflicts with others
      JavaScript or jquery inside the theme ??

      7:29 am on August 30th, 2011 Reply
      • Conflicts are always possible.

        Nowadays I always test out all plugin updates on my test site first. In this way, I can make sure that everything is running smoothly before installing them on my main sites.

        3:09 pm on August 31st, 2011 Reply
    10. Brian

      Is it possible for me to add a custom javascript gallery just for my use? I found some nice ones here, http://galleria.aino.se/

      11:03 am on August 25th, 2011 Reply
    11. Hi Shiba
      Came over from the Studiopress forum where Nick the Geek recommended your plugin for creating a gallery.

      Examples look great and this site is fantastic.
      I’ll give the plugin a try.

      1:26 pm on August 20th, 2011 Reply
    12. Hi,
      your gallery plugin is great, exactly what i was looking for, but I have problem in using it. I did upload the plugin and did the settings in Media under Shiba Galleries in Word Press,
      now How do I get please Gallery in the Dashboard to be able to upload the photos and create the gallery, than i would like to use it on the page not on post. It is for artist portfolio page. Please help me, i am very new to web and try to create website for my business. I would appreciate your help. thank you

      6:51 am on August 19th, 2011 Reply
      • Hello Alice,

        The standard way to create wordpress galleries is to attach the images to a post/page. The same process shown in the tutorial below should work on both Posts and Pages.
        http://shibashake.hubpages.com/_srec/hub/WordPress-Photo-Gallery

        Then you can display the gallery by using the [gallery] shortcode right in the body of the page.
        http://codex.wordpress.org/Gallery_Shortcode

        3:21 pm on August 19th, 2011 Reply
        • Thank you very much, I just started to create the gallery, and I’ve read your tutorial. Such a great plugin and how beautifully explained. Amazing and clear work.

          Warm regards
          Alice

          5:38 am on August 20th, 2011 Reply
        • Hi Shiba
          I notice that you use shortcodes that include an ID for a gallery eg. [gallery id="10" type="noobslide_galleria" ]

          Where do you find the gallery ID?

          I’ve used the method you direct us to above i.e. “attach the images to a post/page”, but I just wondered about the gallery ID.

          Just starting to play with your plugin using slimbox and it is so fast!

          Thanks for a great plugin.

          11:40 am on August 29th, 2011 Reply
          • Hello Keith,
            The gallery ID is simply the post or page ID. You can use the ID attribute to display galleries from multiple different posts or pages within a single page.

            You can get the post ID by editing the post and then looking up at your address/url bar. It should have something like -
            mysite.com/post.php?post=3846&action=edit

            You can also just hover your mouse on the post titles while on the Posts screen. That will also show you the edit post URL and the post ID.

            Let me know if you run into any problems. Cheers.

            3:04 pm on August 31st, 2011 Reply
            • Hi Shiba
              Thanks for the info.
              I’m getting there slowly.

              Love your plugin and if it’s recommended by Studiopress… say no more.

              If I may, could I ask why your plugin is not in the WordPress repositary?
              Any reason?

              11:04 am on September 1st, 2011
            • Hello Keith,
              I tried submitting a theme when I first started playing around with WordPress. One of the replies I got from wordpress.org goes as follows -

              Theme credit links are expected to go to the theme author. I don’t see how a site about dog tips, care and training falls into that category.

              After a few more exchanges, it became clear that their time and mine would be better spent in other more positive pursuits. :D

              8:58 am on September 2nd, 2011
    13. Nicole

      Hi, I would like to use the PictureSlides “Slideshow only and autoplay” option. Is this possible? Thanks for any help.

      2:24 pm on July 21st, 2011 Reply
      • Edit shiba-pslides.php and add
        startSlideshowAtLoad : true,

        on line 19, right after
        jQuery.PictureSlides.set({

        Here are the other settings available for pslides -
        http://www.robertnyman.com/picture-slides/implementation.htm

        2:04 pm on July 22nd, 2011 Reply
        • Nicole

          Thanks for your help, I have done that and added some other settings but can’t see what setting turns off the thumbnail navigation. Am I missing something?

          3:16 pm on July 24th, 2011 Reply
          • To remove thumbnails –
            Edit the shiba-pslides.php file.
            Comment out lines 115-117

            /*	
            			$imgStr .= "< li>\n";
            			$imgStr .= "< a href=\"{$url}\"><img alt='{$image->post_title}'\"  src=\"{$thumb[0]}\" style=\"width:{$thumb[1]}px;height:{$thumb[2]}px;padding:{$padding};\"/></a>\n";
            			$imgStr .= "< /li>\n";
             
            */
            1:03 pm on July 28th, 2011 Reply
    14. Ryan

      Thanks for the great plugin! Quick question:

      Some of my posts with galleries also have PDF files uploaded to the post as well, and the gallery plugin is trying to display the PDF in the gallery, leaving an empty box around the “would be” thumbnail.

      My question: Is there a way to tell Shiba Gallery to ignore the PDF’s so that they don’t display at all?

      Thanks in advance for any help!

      2:34 pm on June 29th, 2011 Reply
      • Try going into shiba-gallery.php and add a ‘post_mime_type’ argument to the $args array on line 514.

        2:54 pm on July 10th, 2011 Reply
    15. Zak S

      Hi, I was wondering if there was any way to include something like a youtube video (or similar embedded media) in a gallery?

      9:51 am on June 10th, 2011 Reply
      • That would be a useful function, but it is currently not in the plugin yet. If you decide to add something like this, let me know.

        3:06 pm on June 13th, 2011 Reply
    16. I seem to remember there was a parameter for sorting photos? I want to display from newest to oldest. I can’t find that anymore so not sure if it ever existed.

      :)

      7:55 pm on June 9th, 2011 Reply

    Leave a Reply

    Your email address will not be published.

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

    search button search button
    rss