【发布时间】:2018-11-16 05:02:00
【问题描述】:
我一直在尝试使用自定义字段创建 WordPress 页面。下面的代码只是添加了一个自定义字段,但方式错误。字段名称是 y,值也是。
client.newPost({
type: "page",
title: "a Page from Node.js",
content: "This page was created sending remotely post from
Node.js.....",
status: "publish",
pagetemplate: "template1.php",
customFields: {
"test":"yes"
},
}, function( error, data ) {
console.log( "Post sent! The server replied with the following:\n" );
console.log( arguments );
console.log("\n");
});
我尝试过:custom_fields、customFields、fields
【问题讨论】: