Title: [Plugin: WordPress Event Calendar] Code Sample
Last modified: August 19, 2016

---

# [Plugin: WordPress Event Calendar] Code Sample

 *  [sagelike](https://wordpress.org/support/users/sagelike/)
 * (@sagelike)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-event-calendar-code-sample/)
 * This works:
 * <?php
    //You instantiate the query object much as you would a WordPress query
   $queryObject = new WEC_Query(‘calendarID=xx’);
 *  //Start the loop
    while($queryObject->haveEvents()): $queryObject->the_event();?
   > <?php $queryObject->theDate(); ?> <?php $queryObject->eventTitle(); ?> <?php
   $queryObject->eventDescription(); ?>
 *  <?php
    //End the loop endwhile; ?>
 * The sample provided in the documentation had a small error.
 * $queryObject = new WEC_Query(‘calendarID=xx’); calendarID=xx is whatever the 
   ID of your calendar is. I think you can also leave this out altogetherl.
 * I like the calendar. It handles recurrence well and seems to work well enough.
 * [http://wordpress.org/extend/plugins/wordpress-event-calendar/](http://wordpress.org/extend/plugins/wordpress-event-calendar/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [kchayka](https://wordpress.org/support/users/kchayka/)
 * (@kchayka)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-event-calendar-code-sample/#post-1198839)
 * Where did you find documentation? There was none in the zip file I downloaded
   and link to the author’s web site goes to an empty page.
 *  [Jeremy Massel](https://wordpress.org/support/users/jkmassel/)
 * (@jkmassel)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-event-calendar-code-sample/#post-1198964)
 * There is documentation in Options->Events-> documentation
 *  [justmattb](https://wordpress.org/support/users/mwbarker/)
 * (@mwbarker)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-event-calendar-code-sample/#post-1198975)
 * Definitely not a plug and play calendar. While it has some great functionality,
   you need to be prepared to do some serious theme coding to get this to work like
   a normal calendar (front end). Using the code above, you can output a line-by-
   line listing of events, but most people are looking for a nice calendar type 
   format with some styling, etc. This plugin has a ways to go.
 * It really is too bad that there are NO good calendars for WordPress. Seriously…
   How long as WordPress been around? And no decent calendars?
 *  [edgarsso](https://wordpress.org/support/users/edgarsso/)
 * (@edgarsso)
 * [16 years ago](https://wordpress.org/support/topic/plugin-wordpress-event-calendar-code-sample/#post-1199025)
 * Even though the documentation could need some improvement, I believe this plugin
   is excellent! I really want to thank the developers for sharing this plugin with
   the WordPress community.
 * I’m going to see if I can format it in the calendar format. If I can pull it 
   off well I will post the code here.
 *  [austinviking](https://wordpress.org/support/users/austinviking/)
 * (@austinviking)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-event-calendar-code-sample/#post-1199041)
 * Kind of have to be joking with the whole theme integration part. Like anyone (
   or almost anyone) is going to deal with that. Activate and use…that’s how it 
   needs to be, plain and simple.
 * And ditto to mwbarker’s comment. How can it possibly be that every WordPress 
   calendar either sucks or isn’t ready for prime time????

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: WordPress Event Calendar] Code Sample’ is closed to new replies.

 * 5 replies
 * 6 participants
 * Last reply from: [austinviking](https://wordpress.org/support/users/austinviking/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-event-calendar-code-sample/#post-1199041)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
