Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 提交帖子时通过XMLRPC API在wordpress中设置帖子标签?_Php_Api_Wordpress_Xml Rpc - Fatal编程技术网

Php 提交帖子时通过XMLRPC API在wordpress中设置帖子标签?

Php 提交帖子时通过XMLRPC API在wordpress中设置帖子标签?,php,api,wordpress,xml-rpc,Php,Api,Wordpress,Xml Rpc,我正试图通过XMLRPC使用WordPressAPI来提交新帖子。但是我不能设置帖子标签(也不能设置类别) 有什么想法吗 $categories[0]="cate1"; $categories[1]="cate2"; $tags[0]="tag1"; $tags[1]="tag2"; ... $content['title'] = $title; $content['categories'] = $categories; $content['mt_keywords'] = $tags; $

我正试图通过XMLRPC使用WordPressAPI来提交新帖子。但是我不能设置帖子标签(也不能设置类别)

有什么想法吗

$categories[0]="cate1";
$categories[1]="cate2";

$tags[0]="tag1";
$tags[1]="tag2";


...
$content['title'] = $title;
$content['categories'] = $categories;
$content['mt_keywords'] = $tags;
$content['description'] = $description; 
更多电子邮件:cn。xiaowen@gmail.com


更多电子邮件:cn。xiaowen@gmail.com

您也可以这样设置自定义字段

$content['custom_fields'] = array(
        array('key' => 'Image', 'value' => $img),
        array('key' => '_aioseop_keywords', 'value' => $aiokey),
        array('key' => '_aioseop_title', 'value' => $title),
    );

您也可以这样设置自定义字段

$content['custom_fields'] = array(
        array('key' => 'Image', 'value' => $img),
        array('key' => '_aioseop_keywords', 'value' => $aiokey),
        array('key' => '_aioseop_title', 'value' => $title),
    );