• Resolved jfritsch

    (@jfritsch)


    Hi, i installed the newest version 6.0 of your very good plugin. It would be very useful to have an attribute “sort-order” (or similar) so it’s possible to list events in ascending order. I only found a way to achieve this by changing the source code in vsel-all.php:
    $vsel_query_args = array(
    ‘post_type’ => ‘event’,
    ‘event_cat’ => $vsel_atts[‘event_cat’],
    ‘post_status’ => ‘publish’,
    ‘ignore_sticky_posts’ => true,
    ‘meta_key’ => ‘event-date’,
    ‘orderby’ => ‘meta_value_num’,
    ‘order’ => ‘asc’,
    ‘posts_per_page’ => $vsel_atts[‘posts_per_page’],
    ‘paged’ => $paged
    );
    I did not find another way…

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Guido

    (@guido07111975)

    Hi,

    I did not add this because I thought this wasn’t necessary for my plugin: why should you want to change this order?

    Guido

    Thread Starter jfritsch

    (@jfritsch)

    Hi,
    thank you for replying!
    My customer wants a short list of recent events in descending order on frontpage and a list of all events in ascending order on an extra page.
    Joe

    Sorry to interrupt the post, I needed a similar thing but managed to sort this via a plugin called WP Order by. https://www.ads-software.com/plugins/wp-order-by/

    Richard

    • This reply was modified 7 years, 9 months ago by Richard Slade.
    Plugin Author Guido

    (@guido07111975)

    Hi guys,

    It’s only a minor change so I can do this in next version. Never thought changing this order could be something user wants, so that’s why I’ve hardcoded it.

    Guido

    Thread Starter jfritsch

    (@jfritsch)

    Thank you Guido, thats very helpful for me!
    Joe

    Plugin Author Guido

    (@guido07111975)

    You’re welcome. I’ve updated plugin several days ago.

    Example changing default events order:

    
    [vsel order=desc]
    

    In case you’re using the widget, add this attribute:

    
    order=desc
    

    Guido

    Thread Starter jfritsch

    (@jfritsch)

    Perfect service!
    Thank You!!!
    Joe

    This thread confuses me. My installation of this plugin displays the farthest out event date first and the closest upcoming event last in my widget list.

    I needed to display them using order=asc and had to use this attribute to make it work.

    I have the same problem as pcgs51. My list is ordered descending, I want it ascending. Can you help please?

    I found the solution. Just add order=asc

    So it is
    [vsel-all-events order=asc]

    I was to quick. The date is fine now, but the times on the same day is still descending. See here: https://www.lerjentours.ch/spazierbuero-festival/
    How can I solve this?

    Plugin Author Guido

    (@guido07111975)

    Hi,

    Please create your own topic next time, this one was resolved already. Normally I don’t check older resolved topics.

    In case of multiple events on the same date, they will be ordered by post ID. Currently I have no alternative for this, sorry. Cannot order on value time because that field is a regular text input.

    Guido

    Plugin Author Guido

    (@guido07111975)

    @pcgs51 – I think you selected to display ALL events in your widget > this means upcoming and past events are displayed in one list. Events in future first.

    Guido

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Sorting Eventlist ASC’ is closed to new replies.