You can set any order you want for galleries within an album. On the manage albums page if you select an album you can change the gallery order by drag/dropping the galleries into whichever order you want. I just tried it and it works for me.
If you have albums within albums (I don’t) then presumably it would work the same.
For pictures there are some sorting options in the gallery settings setup page.
Thread Starter
eZula
(@ezula)
there is no problem for order the album. The problem is that i want a title for each group.
title: A
album: antillen
album: azerty picture
title: B
album: bangkok
album: barcelona
title: C
…
Thx
You can use multiple album shortcodes to do that. Eg.
<h2>album title A</h2>
[album id=6 template=compact]
[album id=3 template=compact]
<h2>album title B</h2>
[album id=7 template=compact]
[album id=9 template=compact]........
This lets you choose the order the albums appear in and also set extra h2 tags and titles for better SEO which you can’t do if using shortcode [album id=0 template=compact]
.
See my site at http://japaneseartsgallery.com/gallery/ for an example of how this displays. I also centered the h2 text by putting a div style around it.
Thread Starter
eZula
(@ezula)
That’s what i mean, but i want it automatical.
I want it with a “while”.
Now i have in the plugin edit “ngg-db.php” on the folow function: find_album(id) :
$query= "SELECT DISTINCT YEAR(galdesc) AS year FROM $wpdb->nggallery ORDER BY galdesc DESC";
$result = mysql_query($query) or die(mysql_error());
while($rij = mysql_fetch_array($result)){
$year = $rij['year'];
echo '<h2>'.$year.'<h2>';
$album = new stdClass();
$album->id = 'all';
$album->name = __('Album overview','nggallery');
$album->albumdesc = __('Album overview','nggallery');
$album->previewpic = 0;
$album->sortorder = serialize($wpdb->get_col("SELECT * FROM $wpdb->nggallery WHERE YEAR(galdesc)='".$year."'") );
}
Now i have on my page (i work with years):
2011
2010
2009
2009-08-08 album 14
2009-07-23 album 11
…
I think it almost works. Just get also the albums by 2011 and 2010 en its super.
Do you see my fold? thank you for hulp.
Thread Starter
eZula
(@ezula)
i see my own fold. The gallery’s are show in album-extend.php in the folder view.
But i have no solution to bring this in a good way. 🙁