質問編集履歴

1

コード追加

2016/07/12 14:59

投稿

chNOBUNAGA
chNOBUNAGA

スコア41

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,23 @@
1
1
  wp-insert-postができずに、困っています。
2
2
 
3
3
  ソースというものは、ありませんが何かファイルを読み込まないといけないのでしょうか?
4
+
5
+
6
+
7
+ ```ここに言語を入力
8
+
9
+ <?php
10
+
11
+ $postarr = Array(
12
+
13
+ 'post_status' => 'publish',
14
+
15
+ 'post_category' => '1',
16
+
17
+ 'post_title' => '記事タイトル',
18
+
19
+ 'post_content' => '記事の内容' );
20
+
21
+ wp_insert_post($postarr); ?>
22
+
23
+ ```