wordpressにて,フロントサイドからカスタム投稿タイプのサイトを使用してたのですが,「無効なページテンプレート」です表示されるようになりました。
プラグインをいくつか入れたこと,モバイル対応のため,headerやCCSを変更していたことが要因だと思われるのですが,原因がつかめません。
同じような事象が発生した方がいらっしゃいましたら。ご教示いただけると幸いです。
追記
●URKは以下のとおりです。ただ,登録してログインしないと入れないのですが
http://www.kenkou-recipes.com/create-thread/make/
●function.phpの概要は以下のとおりです。
function _my_create_note(){ global $create_thread_error; if( is_page('make') && is_user_logged_in() && isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'create-thread-3')){ if(!isset($_POST['title']) || empty($_POST['title'])){ $create_thread_error[] = 'タイトルが空白です'; } if(!isset($_POST['content']) || empty($_POST['content'])){ $create_thread_error[] = '本文が空です'; } if(!isset($_POST["ninzuu"]) || empty($_POST["ninzuu"])){ $create_thread_error[] = '人数が空です'; } if(empty($create_thread_error)){ $id = wp_insert_post(array( 'post_title' => (string)$_POST['title'], 'post_content' => (string)$_POST['content'], 'post_status' => 'draft', //'post_status' => 'publish', 'post_date' => $_POST['Y-m-d'], //'post_author' => $_POST['username'], 'post_author' => get_current_user_id(), 'post_type' => 'threads', 'page_template' => 'single-threads', 'post_category' => array(intval($_POST['cat'])) ), true); if(!is_wp_error($id)){ add_post_meta($id, 'rows', $_SESSION["rows"],false); add_post_meta($id, 'ninzuu', $_POST["ninzuu"],false); wp_insert_post($id);
回答1件
あなたの回答
tips
プレビュー