• Resolved sagelike

    (@sagelike)


    Hi there

    Not sure if I’m in the right place but your name appears with plugin so I was hoping I could get some assistance.

    I installed WordPress Events Calendar and it looks great. It seems to handle recurring events nicely which I haven’t been able to find in other calendars.

    Anyways, I can’t get it working. I don’t have a lot of php experience so I’m having trouble making it work with the code example you provided. It breaks the page.

    Here’s what I’m using:

    <?php
    while($queryObject->haveEvents()): $queryObject->the_event();
    ?>
    <p>
    <?php $queryObject->eventTitle(); ?>

    <?php $queryObject->eventDescription():?>

    <?php
    //End the loop
    endwhile; ?>

    I have one calendar with an ID of 2.

    What am I doing wrong?

    thanks
    Glenn

Viewing 1 replies (of 1 total)
  • Thread Starter sagelike

    (@sagelike)

    Fixed it. Here’s a working sample:

    <?php
    //You instantiate the query object much as you would a WordPress query
    $queryObject = new WEC_Query(‘calendarID=2’);

    //Start the loop
    while($queryObject->haveEvents()): $queryObject->the_event(); ?>
    <?php $queryObject->theDate(); ?>
    <?php $queryObject->eventTitle(); ?>
    <?php $queryObject->eventDescription(); ?>

    <?php
    //End the loop
    endwhile; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Problem getting WP Events Calender’ is closed to new replies.