title: Create a new page with wp_insert_post ()
body: <p>I have the following code in a PHP function that is activated when I install my plugin that lets you create a post or page.</p>
  
  <p>Works perfect and make the page if the <code>$post_type</code> is "post", but if the <code>$post_type</code> is "page", then it does not work, does not create the page.:</p>
  
  <pre><code>$my_post = array(
    'post_title'    =&gt; 'My page Reql',
    'post_type'     =&gt; 'page',
    'post_name'     =&gt; 'my-page',
    'post_content'  =&gt; 'This is my page reql.',
    'post_status'   =&gt; 'publish',
    'comment_status' =&gt; 'closed',
    'ping_status' =&gt; 'closed',
    'post_author' =&gt; 1,
    'menu_order' =&gt; 0
  );
  
  wp_insert_post( $my_post );
  </code></pre>
  
  <p>What is the problem? I can not find the solution.</p>
  
  <p>Thank you very much!</p>