Order Events by last modified date

Home Forums Calendar Products Community Events Order Events by last modified date

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #825083
    artencite
    Participant

    Hello, I have now an hundred events in my website and in my dashboard, I would like to sort them by last modified date (or date of modification ?) But in the screen option, there are only available : date of start and date of end. How can I sort/order my events by last modified date ? Kind Regards (Note : I am not an experienced webmaster )

    #825708
    Geoff
    Member

    Hi there, Aurélien!

    The easiest way to do this is probably to override the template you are using for your calendar view (looks like List view is being used on your site right now) and create a custom query that orders the events by modified date.

    You can use the default WordPress get_posts() function to do something like this:

    <?php $args = array(
    'posts_per_page' => 10,
    'orderby' => 'modified',
    'order' => 'DESC',
    'post_type' => 'tribe_events',
    'post_status' => 'publish',
    ?>

    You’ll likely want to modify that to fit your needs, but it should point you in the right direction. i’d also recommend checkout out our Themer’s Guide for more information on template overrides, if you’re new to them.

    Does this help answer your question? Please let me know. 🙂

    Cheers!
    Geoff

    #827702
    artencite
    Participant

    It’s very kind to answer so fast, but i am very newbie in editing. I spent 1 hour trying to understand your answer, but i still don’t understantd. Which file do i need to edit ? Where is it ? Do I need to create a new file ? where ?

    #827710
    artencite
    Participant

    precision : I use pinboard theme

    #828191
    Geoff
    Member

    Hi there, Aurélien! Thanks for following up and my apologies if my answer wasn’t very clear.

    Try adding this snippet to your theme’s functions.php file. It will probably be a little easier than doing a template override.

    This may or may not work with your specific theme and would need to be modified from there. While that sort of customization is beyond the scope of what I can provide here in the forums, this should get you started in the right direction. 🙂

    I hope this helps!

    Cheers!
    Geoff

    #849825
    Geoff
    Member

    Hey there, Aurélien! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new a new thread and we’d be happy to help you out.  🙂

    Cheers!
    Geoff

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Order Events by last modified date’ is closed to new replies.