WordPress.org

Support

Support » Plugins and Hacks » All-in-One Event Calendar » [Plugin: All-in-One Event Calendar] Order event by start date

[Plugin: All-in-One Event Calendar] Order event by start date

Viewing 7 replies - 1 through 7 (of 7 total)
  • carletto0282

    @carletto0282

    I’m so sorry for the code issue.
    Hope this is ok.

    Events query

    Plugin Contributor Yani Iliev

    @yaniiliev

    Events are posts but event start/end date != post date.
    When you make a query, you have to do an event query, not post query.
    In other words, you have to use plugin’s API to retrieve events ordered by start or end dates.
    The function of interest is get_events_between().
    It is located in Ai1ec_Calendar_Helper class.
    The class is located in: app/helper/class-ai1ec-calendar-helper.php
    I modified your code a bit. I haven’t tested it so there might be typos or other errors but the logic is the same:
    http://pastebin.com/SNp4TJij

    carletto0282

    @carletto0282

    Hi Yani,

    thank you very much for your help.
    Actually I’m on another task.

    I will give a check on your tips as soon as possible.

    Hope they could be useful as they seem to be!
    Thanks again

    Regards
    Carletto

    This pastebin code does not echo out anything. Desperately trying to style my own upcoming agenda view.

    Thanks in advance.

    This is exactly what I need, but the code isn’t working. I’ve looked it over but I’m not familiar enough with ai1ec to find the problem.

    Anybody have any luck?

    Thanks.

    As of version 1.8.3:

    http://pastebin.com/AKShCebx

    The functions of importance are:

    get_events_relative_to()
    get_agenda_date_array()

    If you try to run the code from pastebin, there is no output. Review agenda-widget.php for variables.

    Richard

    @richardgirling

    Thanks for your help, postoy.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] Order event by start date’ is closed to new replies.
Skip to toolbar