• Home
  • Quick Start
    • Color Schemes
  • Documentation
    • Shortcodes
    • JaW Hooks
    • Screenshots of ThemeOptions
  • Tutorials
  • Forum
  • Contact
Log In

  • Home
  • Quick Start
    • Color Schemes
  • Documentation
    • Shortcodes
    • JaW Hooks
    • Screenshots of ThemeOptions
  • Tutorials
  • Forum
  • Contact

HomeCodeHow to Change Items Order in JaW Gallery
jaw-gallery-order (2)

How to Change Items Order in JaW Gallery

If you want to change items order in JaW Gallery, we can tell you that it is possible but you will have to change something in 2 files. But do not worry, its a quite easy 😉 Basically you will have to change the order of items type. Default ordering is PHOTOS, VIDEO and EMBED. If you want to change to something like this VIDEO, PHOTOS and EMBED or another combinations, its possible 😉 Here we go!

  • admin
  • Posted in CodeTutorials
0
SHARES
SHARESHARESHARESHARE
SHARESHARE

So first go to ..\themes\gdaynews\framework\lib\ and open file class_media.php. Then find code on line 451 (this is the default order of JaW Gallery items on frontend):

$gallery_types = array(
0 => “gallery”,
1 => “video_link”,
2 => “embed_link”
);

Here you can change the order, e.g. like this:

$gallery_types = array(
0 => “embed_link”,
1 => “video_link”,
2 => “gallery”
);

jaw-gallery-order

Now (if you want to change the order in the single JaW Gallery) you can go to ..\themes\gdaynews\templates\custom-posts\ and open file single-gallery.php. Then find code between lines 238 – 253 (this should be set the same way as the order you changed earlier):

$gallery_types = array( // for url
0 => “gallery_list”,
1 => “gallery”, // 0
2 => “video_link”, // 1
3 => “embed_link”, // 2
4 => “video_link_pic”,
5 => “embed_link_pic”
);
$gallery_types_items = array( // for styles
0 => “item_list”,
1 => “item”, // 0
2 => “item video_link”, // 1
3 => “item embed_link”,// 2
4 => “item_pic video_link_pic”,
5 => “item_pic embed_link_pic”
);

 

Here you can change the order, e.g. like this:

$gallery_types = array(
0 => “gallery_list”,
1 => “embed_link”,
2 => “video_link”,
3 => “gallery”,
4 => “video_link_pic”,
5 => “embed_link_pic”
);
$gallery_types_items = array(
0 => “item_list”,
1 => “item embed_link”,
2 => “item video_link”,
3 => “item”,
4 => “item_pic video_link_pic”,
5 => “item_pic embed_link_pic”
);

gallery-ordering

Thats it 😉 Check the result


How to Create JaW Gallery

If you have any issues, please give us a feedback

If you like GDayNews Theme, we would be very happy for stars rating 🙂

Related Posts

menu-widget6
0 comments
CodeTutorials

How to add more Widget areas to menu.

install-t6
0 comments
Tutorials

How to set Custom Stock Ticker

install8
0 comments
Tutorials

How to set Custom Stock Widget

brick-wall (2)

What is Masonry Effect

custom_banner (2)

How to Add Another Custom Banner

Related Posts

menu-widget6
0 comments
CodeTutorials

How to add more Widget areas to menu.

install-t6
0 comments
Tutorials

How to set Custom Stock Ticker

install8
0 comments
Tutorials

How to set Custom Stock Widget

mynews
0 comments
Tutorials

MyNews Feature

Tags

  • embed
  • images
  • jaw gallery
  • media
  • order
  • photos
  • positions
  • sort
  • video
  • Was this Helpful ?
  • yes   no
Copyright © 2016 jawtemplates - WordPress Design Studio Disable responsivity