Skip to main content

How to add reverse sort order to Gallery in Widgetkit

For those of you sick of asking for this feature in WidgetKit as I am, I have taken it upon myself to just add the feature.

open /media/widgetkit/widgets/gallery/gallery.php
then on around line 19x… look for this code

// random order  

if (count($images) && isset($settings[‘order’]) && $settings[‘order’] ==“random“) {

and change it to the following

// Sort Orders  

if (count($images) && isset($settings[‘order’])) {
switch($settings[‘order’]) {
case „random“:
case „reverse“:

then open the config.xml within each folder inside /media/widgetkit/widgets/gallery/styles/
and look for the following code (NOTE THAT SOME WILL NOT HAVE THIS CODE SO SKIP THAT FILE)

        <setting name="order" label="Order" type="list" default="default">  
        <option value="default">Default</option>  
        <option value="random">Random</option>

and add directly after that line
<option value=“reverse“>Reverse</option>

Now we can set a reverse sort order for your gallery.

Thanks Kevin Marshall

wordpress, YOOtheme

Николай Комнев

С най-добри пожелания, "Осим Хаим"! e-mail: [email protected]

Вашият коментар