[Plugin: NextGEN Gallery] How to make a random slideshow in the widget
-
For one of the webpages I needed to have a nice gallery and I found NextGen Gallery, which works excellent. However, the slideshow widget has some limitations, i.e. cannot do random picture selection, which I wanted to use. I found a solution in the form of JJ NextGen JQuery Cycle, but there was some trouble with picture resizing: either it cut half of the picture or distorted it. With a bit of “hacking” though, okay, let’s say adjusting ?? it works perfectly.
Here is what you need to do:- Download and activate NextGEN Gallery and JJ NextGen JQuery Cycle. Create album, upload pictures etc.
- Under widgets enable the JJ NextGen JQuery Cycle widget. Select the gallery you want to use, random order (and shuffle if you want).
- Leave the
height
andwidth
boxes blank, we set this in thecss
file rather. So the picture doesn’t get distorted. - Click on
Cycle Lite Settings
and at thfit
selectfalse
and click onSave
. - Edit your
style.css
file (Do it in a child theme if you want to keep the settings after an update. More on this here.) Add the following lines at the end: - Edit
wp-content\plugins\jj-nextgen-jquery-cycle\script\jquery.cycle.lite.1.0.min.js
file. Modify near the end of it to this: (Changes the height and the fit.)
#cycle_lite_container {
height: 200px !important;
}
#cycle_lite img {
border: 1px solid #fff; /* if you want a border around the pics */
max-height: 200px; /* if bottom border is cut, set this to x-(2*border width) */
max-width: 200px;
}D.fn.jjcycle.defaults={
timeout:4000,
speed:1000,
next:null,
prev:null,
before:null,
after:null,
height:”210″,
sync:1,
fit:1,
pause:0,
delay:0,
slideExpr:null
}This should give you a slideshow with pictures within a 200 x 200 px box properly scaled.
- The topic ‘[Plugin: NextGEN Gallery] How to make a random slideshow in the widget’ is closed to new replies.