Cheryl

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Events admin loading slowly in backend. #29837
    Cheryl
    Participant

    Hi Barry,
    We have moved our WP database to a ‘less busy’ server according to the host. Hopefully this will help. I wanted to check with you and see if you might have suggestions or guidelines regarding these long-term recurring events because I felt that having these events with over 350 occurrences might not be the best for performance based on posts I’ve read here on the forum. The only idea I had was to maybe limit how far out the end date could go, such as maybe six months from the start date, something like that.

    Thanks for your help.

    in reply to: get_tribe_events() – start_date and end_date not working #27352
    Cheryl
    Participant

    Hi Barry,
    Thanks for your continued attention to this. Everything is working fine today. Go figure! I’m not sure what changed, but I’ll take it!

    Thanks again!

    in reply to: get_tribe_events() – start_date and end_date not working #27261
    Cheryl
    Participant

    OK, things have improved. I am getting the ‘hidden’ upcoming events when I use the tribe_get_events function, but I am missing one event that has a custom recurrence. It recurs weekly on Tuesday – Saturday ending on 2012-11-30 and looks like this in the _EventRecurrence field on the database:

    a:13:{s:4:”type”;s:6:”Custom”;s:8:”end-type”;s:2:”On”;s:3:”end”;s:10:”2012-11-30″;s:9:”end-count”;s:1:”1″;s:11:”custom-type”;s:6:”Weekly”;s:15:”custom-interval”;s:1:”1″;s:16:”custom-type-text”;s:11:”Week(s) on:”;s:21:”occurrence-count-text”;s:5:”event”;s:15:”custom-week-day”;a:5:{i:0;s:1:”2″;i:1;s:1:”3″;i:2;s:1:”4″;i:3;s:1:”5″;i:4;s:1:”6″;}s:19:”custom-month-number”;s:5:”First”;s:16:”custom-month-day”;s:1:”1″;s:24:”custom-year-month-number”;s:1:”1″;s:21:”custom-year-month-day”;s:1:”1″;}

    My search is for today thru 2012-11-18. I do get this one with the WP_Query but not the tribe_get_events.

    in reply to: get_tribe_events() – start_date and end_date not working #27224
    Cheryl
    Participant

    Thanks for the reply.

    I changed the display type to ‘all’ and got the same result. I removed the dates altogether, and got the same results.

    When I used the WP_Query class, and used the meta_query parameter in the arguments to compare the _EventStartDate and _EventEndDate fields against my input dates, I noticed by dumping the contents of the resulting object that the query was using current date to select events instead of my input dates in the query.

    This is how I did the meta parameter piece:
    ‘meta_query’ => array(
    ‘relation’ => ‘AND’,
    array(
    ‘key’ => ‘_EventEndDate’,
    ‘value’ => $startdate,
    ‘compare’ => ‘>=’,
    ),
    array(
    ‘key’ => ‘_EventStartDate’,
    ‘value’ => $enddate,
    ‘compare’ => ‘<=',
    ),
    where $startdate and $enddate are in Y-m-d H:i:s format.

    By using the WP_Query class, without any meta parameters, I can get all of the events from today onward and then filter those with additional code to select the date range required. However, I noticed when I examined the object that the query has injected some selection criteria which excludes events that have the "hide from upcoming" meta data, even though I didn't specify anything about that in my query parameters. I would like to get all published events in the range for this query.

    So, that's where I'm at.

    in reply to: get_tribe_events() – start_date and end_date not working #27156
    Cheryl
    Participant

    Me again. Here’s the relevant code where $startdate and $enddate are in Y-m-d format:

    $taxomonies = array(‘relation’ => ‘IN’);

    if ( isset($events)) {
    $array1 = array(
    ‘taxonomy’ => ‘tribe_events_cat’,
    ‘field’ => ‘id’,
    ‘terms’ => $events
    );

    $taxonomies[] = $array1;
    }

    $args = array(
    array(
    ‘start_date’ => $startdate,
    ‘end_date’ => $enddate,
    ‘posts_per_page’ => -1,
    ),
    ‘tax_query’ => $taxonomies,
    );

    global $posts;
    $get_posts = tribe_get_events($args );

    in reply to: get_tribe_events() – start_date and end_date not working #27154
    Cheryl
    Participant

    Hello. I am also having a problem with this function. The end_date parameter works fine, but the start_date always starts from today instead of using my input date, which is in Y-m-d format. I’n not using the eventDisplay parameter.

Viewing 6 posts - 1 through 6 (of 6 total)