NextGEN Gallery Voting
[resolved] Sort on Rating? (5 posts)

  1. davym123
    Posted 3 years ago #


    Is it possible to sort the images in the gallery on rating?
    So the highest rated will be on top.



  2. shauno
    Plugin Author

    Posted 3 years ago #

    Hi davym123
    Unfortunately that isn't possible with the plugin right now. There currently isn't anyway for the voting plugin to get access to the list of images from NGG before it displays.

    I will add this to the to-do list though. I might be able to convince the NGG devs to add a hook for me. Or if not, I could maybe add a function you call at the top of the display template that re-orders the array of images.

    Thanks for the feedback.

  3. davym123
    Posted 3 years ago #


    I see.
    But in the admin panel you have a list that says "top rated images"
    Can you make a shortcode for that so the users on the website can also see it ?

    Thanks for your reply!

  4. shauno
    Plugin Author

    Posted 3 years ago #

    The 'top rated' images screen was a bit of a hack as an experiment more than anything. It circumvents some of NGG's default functionality, and isn't a good 'best practice'. It works by first getting the voting results in the correct order, and then fetching the images 'linked' to those votes.
    The shortcodes that are used to display galleries in your site are controlled by NGG, and they have no connection to the votes. I hook the voting in after all the database stuff is done, and display is just being built.

    It really isn't optimized enough to be able to be used on the front end of a web site.

    As I said, I will try ask the NGG devs for a hook, or possible write a function to re-order the image array in the display template itself.

  5. shauno
    Plugin Author

    Posted 3 years ago #

    Hi davym123
    Just thought I would let you know that I have updated NextGEN Gallery Voting Premium with a feature that allows you to order the images by the voting results. All you need to do is add and extra tag to the top of the display template, and the images can be ordered highest-to-lowest, or lowest-to-highest.
    You can get the Premium add-on at CodeCanyon.

    Let me know if you have any questions :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery Voting
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.