• Resolved miro382

    (@miro382)


    Hi,
    is it possible to somehow create an event using PHP?

    $my_post = array(
    		  'post_title'    => $title,
    		  'post_content'  => $tcontent,
    		  'post_status'   => 'publish',
    		  'post_author'   => $author_id,
    		  'post_category' => array($category_id)
    		);
    		
    		$post_id = wp_insert_post( $my_post );

    If I have such a code … What needs to be added to create an event?

    Thanks.

    • This topic was modified 2 years, 10 months ago by miro382.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create new event PHP’ is closed to new replies.