我很难解决我的这个问题。
我有一个插件,它在默认情况下为新的wordpress多站点站点创建6个页面。Im使用以下代码。
function create_pages_default() {
global $user_ID;
// Update Sample Page and turn into About page
$samplepage = array(
\'ID\' => \'2\',
\'post_name\' => \'about\',
\'post_title\' => \'About\',
\'post_type\' => \'page\',
\'post_author\' => $user_ID,
\'post_content\' => \'<p>Write something about your business. This may include but not limited to what you sell, what are your target audience or market, who you are, your objectives, background history and your location.</p>\',
\'menu_order\' => \'1\',
\'post_status\' => \'publish\',
\'comment_status\' => \'closed\'
);
// Create Store Page
$storepage = array(
\'post_name\' => \'store\',
\'post_title\' => \'Store\',
\'menu_order\' => \'2\',
\'post_type\' => \'page\',
\'post_author\' => $user_ID,
\'post_content\' => \'[WP_online_store]\',
\'post_status\' => \'publish\',
\'comment_status\' => \'closed\'
);
// Create Blog Page
$blogpage = array(
\'post_name\' => \'blog\',
\'post_title\' => \'Blog\',
\'post_author\' => $user_ID,
\'menu_order\' => \'3\',
\'post_type\' => \'page\',
\'post_status\' => \'publish\',
\'comment_status\' => \'closed\'
);
// Create Contact Us Page
$contactus = array(
\'post_name\' => \'contact\',
\'post_title\' => \'Contact Us\',
\'post_author\' => $user_ID,
\'menu_order\' => \'4\',
\'post_type\' => \'page\',
\'post_content\' => \'[support-front]<p>Feel free to contact us using the form below about pre-sale questions, about us, our upcoming products, product/order support and anything with regards to our products and services offered.</p><p>A dedicated ticket page will be opened and the access key will be sent on your email address you have provided or your account registered email address to keep you updated of our reponses.</p>[/support-front]\',
\'post_status\' => \'publish\',
\'comment_status\' => \'closed\'
);
// Create Privacy Page
$privacypage = array(
\'post_name\' => \'privacy\',
\'post_title\' => \'Privacy\',
\'menu_order\' => \'5\',
\'post_type\' => \'page\',
\'post_author\' => $user_ID,
\'post_content\' => \'<p>Edit this Privacy Policy page with regards to the policies concerning the information you get from your customers when they subscribe, comment, register or purchase anything on your blog store.</p>\',
\'post_status\' => \'publish\',
\'comment_status\' => \'closed\'
);
// Create Terms Page
$termspage = array(
\'post_name\' => \'termsconditions\',
\'post_title\' => \'Terms & Conditions\',
\'menu_order\' => \'6\',
\'post_author\' => $user_ID,
\'post_type\' => \'page\',
\'post_content\' => \'<p>Edit this Terms and Conditions page for your customers. This may include but not limited to the policies concerning refunds, damaged products, deliveries, shipping, payment methods, purchasing products and so on.</p>\',
\'post_status\' => \'publish\',
\'comment_status\' => \'closed\'
);
wp_insert_post( $blogpage );
wp_insert_post( $storepage );
wp_insert_post( $contactus );
wp_insert_post( $privacypage );
wp_insert_post( $termspage );
wp_insert_post( $samplepage );
}
add_action( \'wpmu_new_blog\', \'create_pages_default\', 10, 6);
当你在博客中注册一个新帐户时,它可以完美地工作。然而,问题是,当前登录的用户为其帐户创建了一个博客,在提交了博客创建表单后,它进入了一个空白的白色页面,这是一件奇怪的事情,并且成功创建了博客,但页面没有创建。
我试图删除这个功能并创建一个示例博客,但没有“空白白页”,所以我想问题出在这个功能上。
如何解决此问题?