WordPress.org

Ready to get started?Download WordPress

Forums

Event Calendar 3 for PHP 5.3
Calendar Day Archive Returns Date Post Created NOT Event Date (1 post)

  1. mulegoat
    Member
    Posted 2 years ago #

    Hi guys

    My event calendar at http://www.barnesmums.com/event-calendar

    Is not working as it should. Having modified the plugin to setup recurring events the calendar returns an archive list for the date the event was created in WordPress rather than the date of the Event as set in the Event editor panel.

    Does anybody have any idea why it would do this?

    Within my themes functions.php file I have the following code which displays upcoming events as a list:

    <?php function ec3_get_events_posts()
    {
      if(!ec3_check_installed(__('Upcoming Events','ec3')))
        return;
      global $ec3,$wpdb,$wp_version, $post;
      // Find the upcoming events.
      $querystring =
        "SELECT DISTINCT wposts.*, s.*
        FROM $wpdb->posts wposts, $ec3->schedule s
        WHERE wposts.id=s.post_id
            AND wposts.post_status='publish'
            AND s.end>='$ec3->today'
        ORDER BY start";
      $calendar_entries = $wpdb->get_results($querystring);
      echo "<!-- Generated by Event Calendar v$ec3->version -->\n";
      if($calendar_entries)
      {
        foreach ($calendar_entries as $post):
        $post->ec3_schedule[]=$post;
        setup_postdata($post);
       ?>

    I also have a modified template-functions.php file (‘template-functions-new.php’) but its too big to post it here so I’ve placed it here

    http://www.mularam.com/calendar/template-functions-new.txt

    If anybody has a clue as to why the calendar only archives events for the post date rather than event date that would be great.

    Many thanks!

    http://wordpress.org/extend/plugins/event-calendar-3-for-php-53/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic