I am trying to create a new page using the wp_insert_post() function as follows:
$page = array('post_type' => 'page' ,'post_title' => 'The Resolution AR' ,'post_status' => 'publish' ,'post_author' => 1 ,'post_slug' => 'the-resolution-ar-2019' ); $page_id = wp_insert_post($page);
A page does get created. Except, it gets created with the wrong post_slug.
When I look in WP_POSTS I see the post_slug as: the-resolution-ar
For some reason the function does not like the -2019 portion of the slug I am providing and automatically removes it. Any ideas?