Creating pages when activating plugin WordPress
<p>Anyone Please help!
I have a plugin which creates post_type pages in the backend. The plugin is creating the desired pages but the problem is whenever i try to see the page list, it shows "No pages found" message. Screenshot here: <a href="http://prnt.sc/azalub" rel="nofollow">http://prnt.sc/azalub</a></p>

<p>My code for creating the required pages here:</p>

<pre><code>$new_page = array('post_title'    =&gt; $title,
                  'post_content'  =&gt; '['.$shortcode.']',
                  'post_status'   =&gt; 'publish',
                  'post_type'     =&gt; 'page'
                );
$post_id = wp_insert_post( $new_page );
</code></pre>