[Plugin: WP Photo Album Plus] alpha sort within order#
-
I have pictures within albums ordered by setting the sort by order# the same for groups and that sortation works. However, I would like the pictures within each order# group to be in alphabetical sequence by name.
I found the following changes at http://www.puregamer.co.uk/blog/wppa-order.html which apparently were for an older version of the plugin, however, they would seem to work if applied correctly. I’m not a PHP programmer so would appreciate your evaluation of these potential changes and perhaps provide examples of changes for the current plugin.
function wppa_album_photos($id) { /* $photos = $wpdb->get_results("SELECT * FROM " . PHOTO_TABLE . " WHERE album=$id", 'ARRAY_A'); */ $photos = $wpdb->get_results("SELECT * FROM " . PHOTO_TABLE . " WHERE album=$id ORDER BY name", 'ARRAY_A'); } function wppa_get_thumbs($id) { /* $thumbs = $wpdb->get_results("SELECT * FROM " . PHOTO_TABLE . " WHERE album=$album", 'ARRAY_A'); */ $thumbs = $wpdb->get_results("SELECT * FROM " . PHOTO_TABLE . " WHERE album=$album ORDER BY name", 'ARRAY_A'); } function wppa_prev_next($id) { /* $ids = $wpdb->get_results("SELECT id FROM " . PHOTO_TABLE . " WHERE album=$album", 'ARRAY_N'); */ $ids = $wpdb->get_results("SELECT id FROM " . PHOTO_TABLE . " WHERE album=$album ORDER BY name", 'ARRAY_N'); }
My site is http://www.neotropicalbutterflies.com/Wordpress
Thanks for your help.
- The topic ‘[Plugin: WP Photo Album Plus] alpha sort within order#’ is closed to new replies.