WordPress.org

Forums

Events Manager
How to personnalise the order of events list by day (17 posts)

  1. ouakari
    Member
    Posted 1 year ago #

    Hey!

    I'm nearly done with developing my new website. However, when encoding my numerous events I'm realizing that the list of events (especially by date) is confusing.

    The long-lasting events appear at first place while the one-day events appear at the bottom of the list. I would want to inverse that, that is to show the one-day events on top of the list, then the long-lasting events.

    Ideally, in place of the 4 options by default in "Default event list ordering", my events would be ordered like this:
    1- one-day event
    2- category

    How do you think I should do?

    Thanks in advance for your help :-)

    https://wordpress.org/plugins/events-manager/

  2. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Hi,

    I'm not sure I follow 100% what you need to do. Am I right in thinking you want to move events that run across more than one day to the bottom of the listing for that particular day? Thanks.

  3. ouakari
    Member
    Posted 1 year ago #

    Hi!

    That's exactly what I'd like to do.

    Sothat the events taking place on a single day appear first in the list...

  4. angelo
    NetWebLogic Support
    Posted 1 year ago #

    am afraid that this is not possible out of the box without custom php coding on your part; if you can code we can give sample snippet to start although we can't provide 100% support with regards to custom coding.

  5. ouakari
    Member
    Posted 1 year ago #

    Hi!

    Thanks for your answer. I have basics in coding, so I'd be very greatful if you could provide me with elements to begin with...

  6. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Unfortunately, what you're asking is to do something quite complicated. You'd probably need to create a custom shortcode - this thread has one that could be adapted:

    http://wordpress.org/support/topic/plugin-events-manager-list-recurring-events-as-one-event?replies=11

    An alternative to all that coding would be to use a category or tag to label the events that should be listed at the bottom. Then use two shortcodes to generate a listing without events in that category and another with only events in that category.

    Something like this:

    [events_list category="-5"]
    [events_list category="5"]
  7. ouakari
    Member
    Posted 1 year ago #

    Thanks Caimin.

    I have managed to create a page with the shortcodes you explained me before. That's a first step already, thanks for that!

    The fact is I'm using the mini-calendar widget, composed of one link to the list of events for every single day. How can I make it work in the same way as upper?

    I have tried to enter this in my general "Events" page :

    [events_list scope="today" category="z"]
    [events_list category="-z"]

    This works fine, except the fact that the first part of the list shows today's event, and not the event taking place on each single day. What could I use in place of the "today" argument? cf. http://wp-events-plugin.com/documentation/event-search-attributes/

    Thanks in advance.

  8. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    What time period do you want to display?

  9. ouakari
    Member
    Posted 1 year ago #

    Day by day.

  10. angelo
    NetWebLogic Support
    Posted 1 year ago #

    try shortcode [events_list_grouped mode="daily" scope="today" category="z"]

  11. ouakari
    Member
    Posted 1 year ago #

    Thanks angelo, but this makes really few difference... Only events happening today are shown, not the ones taking place that very day.

  12. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    I'm not sure I follow what you mean. Can you give an example of what's showing / missing? Or post a link?

  13. ouakari
    Member
    Posted 1 year ago #

    Here is a screenshot showing the list of events taking place on the 12th of June.

    As you can see, the long-lasting events appear first, followed by the events taking place on a single day. This will be problematic when I'll be adding more events, since the punctual ones will be systematically placed at the bottom.

    This is why I'd want them to be placed on top.

  14. ouakari
    Member
    Posted 1 year ago #

    Put in other words, the events list would be ordered not by date, hour and name, but by length then by date.

    Can you tell me where I could change this order?

  15. Stephen
    Member
    Posted 1 year ago #

    I think you need an event search attributes with custom orderby.

  16. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    The only option, I think, is to write a custom query to:

    1. Get all the events in the time period

    2. Make sure they're in the correct order (using orderby)

    3. Reorder the array so that long events are moved to the top

  17. ouakari
    Member
    Posted 1 year ago #

    Thank you caimin_nwl. Can you tell me how I can write such a query, and where I should add it? Then, how can I reorder the array automatically?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic