• Resolved sicariusalex

    (@sicariusalex)


    I am creating an event as such:

    $newEvent = array(
    ‘post_type’ => ‘event_listing’,
    ‘post_title’ =>$title,
    ‘post_status’ => ‘publish’,
    ‘meta_input’=> array(
    ‘_event_title’ =>$title,
    ‘_event_category’ => $categories,
    ‘_event_start_date’ => $startDate,
    ‘_event_end_date’ => $endDate,
    ‘_event_banner’ => $image,
    ‘_links_to’ => $url,
    ‘_event_location’ => $venue
    )

    I am struggling to set the event category. How do I do so?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Create an event post with PHP’ is closed to new replies.