Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4498
    Bob
    Participant

    I have to show images on different pages using different galleries. One gallery for all images, and several separate galleries with different parts of the image collection, sorted on ‘title’ (=the original filename of the image DSC00001, DSC00002, etc)

    I tried this using tags (but was not able to sort on ‘title’) and using albums, where sorting on ‘title’ is possible. However I noticed that one image can only be assigned to one single album. So both options are not working for me.

    Is there a way to use images in multiple galleries, sorted by title? If this is not possible, please inform me where (in the source code) to chance the default tag sorting from ‘ID’ to ‘title’. I really, really need this asap.

    Thanks in advance.

    #4503
    Rattus
    Keymaster

    I’ll add option to Settings and to each module to set default sorting for tags and categories on frontend. You can wait few days for new version or change ‘grand-media/inc/shortcodes.php’ at line 206.
    Replace:
    $gmedia[ $term_id ] = $gmDB->get_gmedias( array( 'tag__in' => $term_id, 'status' => $gmedia_status ) );
    to:
    $gmedia[ $term_id ] = $gmDB->get_gmedias( array( 'tag__in' => $term_id, 'status' => $gmedia_status, 'orderby' => 'title', 'order' => 'ASC' ) );

    orderby can be ‘ID’, ‘title’, ‘date’, ‘modified’, ‘rand’, ‘author’ and in next plugin version I’ll add ‘filename’
    order can be ‘ASC’ or ‘DESC’

    you can combine orderby like ‘title ID’, so it first order by title and if some titles will be the same it will order them by ID.

    #4504
    Bob
    Participant

    Dear Rattus,
    Thank you very much for your answer. I’ll try it myself. If I fail, I will wait for the update :)

    Keep up the good work. Really like the plugin, check anno85.nl (in a few days) to see it in action

    #4506
    Bob
    Participant

    Update: code changed, works great. Thank you again.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Troubleshooting’ is closed to new topics and replies.
Forum closed. Use forum at Wordpress.org: Gmedia Support Forum