PHILLIPA

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Removing upcoming events if they have started #1333930
    PHILLIPA
    Participant

    Hi Shelby

    We found the code here:

    Filter events with start date after now

    On the tail end of this Brian suggests that $query->is_main_query() should be included to avoid problems with other views.

    The code block is working fine – I’m just a bit unsure how to incorporate $query->is_main_query()

    Thank you

    in reply to: Update single event meta data #1299556
    PHILLIPA
    Participant

    Thank you for your reply Barry, in fact I added it as a tribe custom field. So would this be the right function:
    tribe_update_event($event_id, $args);

    in reply to: Update single event meta data #1299004
    PHILLIPA
    Participant

    Hi I have come up with this myself but have not run it due to safety concerns – Does this look ok and will it create any problems – since I am updating the database directly

    $holdvalue=$custom_fields['Places Left'] ;
    $holdvalue = $holdvalue -1;
    $args = array(
     'Places Left' => $holdvalue
    );
    tribe_update_event($event_id, $args);
    
Viewing 3 posts - 1 through 3 (of 3 total)