Plugin Directory

Gallery Widget

How can i adjust the look of the Widget?

Just use the CSS-Class "wGallery" to alter the ul- or li-tags.

How can i get only the images of one/some categories?

Use the category-option include or exclude and enter the id's separated by comma in the options of the widget. Using include or exlcude causes more sql-queries and is slower than the base function. You should only use it if you're blog doesn't have to much traffic and/or your host can handle it :)

Why doesn't the images link to the parent article?

This option actually only works with "category-option" set to include or exclude.

How do i use the shortcodes?

Latest 5 images linking to the attachment page (default option): [getGWImages]

You could use the following parameters: - max=int - order='latest|random' - linktype='direct|page' - linkclass='css class' - linkrel='relation for the link'

i.e. 3 random images with a link to the images: [getGWImages max=3 order=random]

If you would like to use the category include/exclude options you have to use this shortcode:

[getGWImages2]

The following parameters are possible: - max=int - order='latest|random' - categories='comma separated list of category id's' - option='include|exclude' - linktype='direct|page' - linkclass='css class' - linkrel='relation for the link' - singleimage='yes|no'

Is it possible to show the images at any position in the theme (not only as widget)?

Yes, you can use the following code to include the images:

<?php if ( is_object($galleryWidget) ) : ?>
<?php echo $galleryWidget->getAttachedImages(maximages, [latest|random], [old|direct], css-class, link-relation); ?>
<?php endif; ?>

for instance, 5 random images:

<?php if ( is_object($galleryWidget) ) : ?>
<?php echo $galleryWidget->getAttachedImages(5, 'random'); ?>
<?php endif; ?>

latest 7 images of the categories 1, 2 and 5, only 1 image per post/link to article (css: wGallery, relation: lightbox):

<?php if ( is_object($galleryWidget) ) : ?>
<?php echo $galleryWidget->getAttachedImagesByCategories(7, 'latest', '1,2,5', 'include', 'article', 'wGallery', 'lightbox', 'yes'); ?>
<?php endif; ?>

Attention: If you wan't to use the galleryWidget-object in a function (like the sidebar), you have to include the global variable $galleryWidget (add global $galleryWidget; before if())

Shortcode-Example using CSS

To show 9 random images:

  • In your article just post the following (in html, not wysiwyg-mode)

    [ getGWImages max=9 order=random linkclass='testClass' ]
  • Add the following to the style.css of your theme /* TestClass / .testClass { overflow: hidden !important; padding: 10px 5px !important; } .testClass ul { float: left !important; } .testClass li { list-style-type: none !important; display: inline !important; padding: 5px !important; float: left !important; margin: 5px !important; width: 150px !important; / size of the thumbnail / height: 150px !important; / size of the thumbnail */ } .testClass li a img, .testClass li a:visited img { border: solid 1px #fff !important; } .testClass li a:hover img { border: solid 1px #000 !important; }

For more examples and other questions, take a look at the support forum.

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus

No data
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(7 ratings)