Events Made Easy Forums Bug fixed or feature request implemented This_week scope not working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #53701
    Anonymous
    Inactive

    Hi,

    I’m using the following shortcode:

    [eme_events category=1 scope=today--this_week]

    My events list shows today events + 7 days ignoring the end of the week (sunday) so today that is wednesday I’m showing all the events from today to the next thursday.

    Is the shortcode ok? Any idea?

    Thanks,
    David.

    #53704
    Franky
    Keymaster

    Indeed, seems to be wrong for a long time already.
    Try this: change in eme_events.php the lines

    
       } elseif ($scope == "today--this_week") {
          $start_of_week = get_option('start_of_week');
          $day_offset=date('w')-$start_of_week;
          if ($day_offset<0) $day_offset+=7;
          $end_day=$day_offset+6;
    

    to

    
       } elseif ($scope == "today--this_week") {
          $start_of_week = get_option('start_of_week');
          $end_day=6-date('w')+$start_of_week;
    

    That should help … let me know the result please.

    #53708
    Anonymous
    Inactive

    Works Perfect!

    Thanks!
    D.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top