[Plugin: Event Calendar 3] Archives ordered by event dates (2 posts)

  1. borisrorsvort
    Posted 5 years ago #

    I've search many days to solve that.
    How can you tell the wordpress build in archive page to order your post by event_dates without create a page manually for each year?

    I've bee using PostList with the Ec3 plugin to display event on specific pages. But the clients wants to see all event per year ordered by events dates.

    Any idea?

  2. borisrorsvort
    Posted 5 years ago #

    Hi, i just got the answer from the support newsletter of ec3 and this does apparently the trick.

    Paste this code into your functions.php template file and let the magic do:

    function custom_rewrite_rules($rules) { 
    $custom_rules = array();
    $custom_rules['([0-9]+)/?$'] =
    $custom_rules['([0-9]+)/([0-9]+)?$'] =
    $custom_rules['([0-9]+)/([0-9]+)/([0-9]+)?$'] =
    return $custom_rules + $rules;

    Don't forget to Update your permalinks structure so it takes filter

    Thanks to Jonathan Alderson for this answer

Topic Closed

This topic has been closed to new replies.

About this Topic