<?php require ( '/wp-content/themes/twentythirteen/single-project.php'); require_once( dirname( __FILE__ ) . '/wp-load.php' ); //投稿 $post_id = wp_insert_post(array( 'post_title' => (string)$_POST['title'], 'post_content' => 'aaa', 'post_author' => get_current_user_id(), 'post_name' => ’ssss', 'post_type' => 'oubo', ), true); if($post_id){ //メール送信 global $current_user2; $current_use2r=get_currentuserinfo(); $to=$current_user2->user_email; $subject='申請を受け付けました'; $message='成功'; $headers[] = 'From: Me Myself <me@example.jp>'; $headers[] = 'Cc: John Q Codex <jqc@example.org>'; $headers[] = 'Cc: iluvwp@example.org'; // シンプルにメールアドレスだけでも構わない wp_mail( $to, $subject, $message, $headers ); //ページを移動 header('Location: projec.php'); die(); } else { $create_thread_error[] = '投稿時にエラーが発生しました。'.$post_id->get_error_message(); } ?>
なぜでしょう
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。