Recreating Calendar Page, Event List Default Sorting

24 views
Skip to first unread message

stephen h

unread,
Jul 4, 2011, 6:47:57 PM7/4/11
to event...@googlegroups.com
Hi, I've got an install of eventpress running on a site with a custom theme, and I seem to either have removed the events calendar page or it was never created. De-activating and re-activating the plugin doesn't seem to fix this. Is there another way to add the calendar view to a page?

Also, for the main event list page, the default sorting is based on which event has had the latest activity, not by start date, which to me seems much more logical. Is there a place I can look in the plugin code to change this? I've done some looking around in the files but can't seem to find where this would be set.

Thanks in advance for any help on this!

Kunal Bhalla

unread,
Jul 4, 2011, 9:08:03 PM7/4/11
to event...@googlegroups.com
Use the short code [ep-calendar] to display the calendar on any
page—however, there seems to be a bug in displaying single day events
on the calendar (something's wrong with the query that gets the data)
that I haven't been able to resolve yet.

The query for the page is carried out in bpcp/controller.php—you might
want to take a look at that to modify sorting criteria. The theme file
that is being used by default will be in bpcp/themes/type/index.php.

Hope that helps.

Kunal

stephen h

unread,
Jul 5, 2011, 12:27:45 PM7/5/11
to event...@googlegroups.com
Thanks for the prompt reply! Any suggestions on what to change in bpcp/controller.php to get the query I'm looking for? Ideally I'd like to have a calendar on my site, since I'm posting a lot of various community events(including mostly single-day events), but barring that, having a sorted list based on start date would be the next best thing.

Also, where is the calendar query originating from in the files? I might take a look at that and see what I can find out, too. Maybe I'll be able to come up with a fix for that that I can contribute.

Finally, I'm also in the process of developing a travel section for the site, and having the ability to run a search for events inside a specified date range would be awesome. Would you be able to send me any tips on how best to structure a query for that?

Kunal Bhalla

unread,
Jul 6, 2011, 2:46:31 PM7/6/11
to event...@googlegroups.com
Basically you should look at the query generated in the controller,
and you can modify it as required. The calendar is at
views/ep-calendar.php; and looking at that code should also answer
your questions about querying wordpress for a range of dates (just a
wp_query on meta keys _ep_start and _ep_end).

Hope that helps a bit!

Kunal

Reply all
Reply to author
Forward
0 new messages