• Resolved jwonder

    (@jwonder)


    I really like the plugin, it rocks!! Thank you!

    Our users love it but we are getting a lot of questions on the sort order. I have it set for ordering by “views count” to push the most viewed up to the top, and it really works well to get our users engaged.

    We do have series of videos for training, etc and there are people who want to be able to change the default search and search by “Title” instead. I am a programmer but do not want to modify the core plugin myself, once making it not resilient to future upgrades.

    Suggestions on how best to have a dropdown for video sorting would be very much appreciated!

    Thank you!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor wpvideogallery

    (@wpvideogallery)

    Sorry, this needs to be custom developed.

    When you look at the back-end of your search results page, you can see a shortcode [aiovg_search] that handles the search output. This shortcode can be customized with the “orderby” and “order” attributes that controls the videos display order.

    Example: [aiovg_search orderby=”title|views” order=”asc|desc”]

    So, the solution is to develop another shortcode that adds a dropdown with the video sorting options and generate the search shortcode dynamically based on the selected sorting option.

    <?php echo do_shortcode( '[aiovg_search orderby="'. $orderby . '" order="' . $order . '"]' ); ?>

    Note, you must replace the [aiovg_search] shortcode in the search results page with your custom shortcode.

    Hope, this helped you!

    Thread Starter jwonder

    (@jwonder)

    Thi worked just fine, thank you very much!!!! My sort works great!!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sort order’ is closed to new replies.