【发布时间】:2014-03-19 20:47:46
【问题描述】:
我制作了一个 php 脚本,可以在 wordpress 网站上发布一篇新文章。
这是我的代码的一部分:
$terms_names = array('post_tag' => $tags);
$content = array(
'post_type' => 'post',
'post_status'=>'pending',
'post_title'=> 'TEST',
'post_author'=> 1,
'post_excerpt' => 'SOMETEXT',
'post_content'=> 'POSTBODY',
'post_date_gmt' => '',
'comment_status'=>1
'ping_status'=>0,
'post_thumbnail' => $results,
'terms_names' => $terms_names
);
$params = array(0,$username,$password,$content,false);
$request = xmlrpc_encode_request('wp.newPost',$params);
有可能添加帖子标签吗? 谢谢大家
问候
编辑:
问题已解决:)
我添加了$terms_name 数组,
我刚刚编辑了我的代码:)
问候
【问题讨论】: