I'm trying to create a page by activating a plugin, but when it tries to access it, it says the page was not found, it even arrives without a host, but it gets a "scheduled" tag.
function projetos()
{
$post = array(
'comment_status' => 'open',
'ping_status' => 'closed' ,
'post_date' => date('Y-m-d H:i:s'),
'post_name' => 'Projeto',
'post_status' => 'publish' ,
'post_title' => 'Ver Projeto',
'post_type' => 'page',
);
$newvalue = wp_insert_post( $post, false );
update_option( 'proj-pages', $newvalue );
}
register_activation_hook( __FILE__, 'projetos');