WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] quering events only one time (regardless of reoocuring) (2 posts)

  1. asafche
    Member
    Posted 2 years ago #

    First off all, this plugin is awsome. thanks!

    now,
    i'm echoing my event list inside a custom page like with those args.

    $args = array(
    		'order'     => 'ASC',
    		'posts_per_page' => 10,
    	);

    the problem is that is when i have only few events but with some of them reoccurring. in that case i get the reoccurring events a bunch of times but i only need them to show once.

    Is there a proper way of doing this (query like) or should i code an ugly check inside the loop so it will check if the event already shown or not, and skip the event if it had shown.

    what do you say?

    thanks.

    http://wordpress.org/extend/plugins/event-organiser/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry asafche - this question seems to have slipped off the radar.

    Yes there is a way of doing this:

    $args = array(
    		'order'     => 'ASC',
    		'posts_per_page' => 10,
                    'group_events_by'=>'series'
    	);

    This shows only the 'first' occurrence (in order of how they appear in the query) and subsequent occurrences of that are event are skipped. Usually, you'll want to make sure you are only showing future events.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic