ThaiSEOBoard.com

พัฒนาเว็บไซต์ => Programming => หัวข้อเริ่มโดย: cerberuz ใน 17 สิงหาคม 2013, 10:29:24

ชื่อเรื่อง: ถามเกี่ยวกับการเขียนโปรแกรม auto post ลง wp
โพสต์โดย: cerberuz ใน 17 สิงหาคม 2013, 10:29:24
คือผมทำเสร็จหมดแล้ว แต่อยากเพิ่มตอนใส่ category อะครับ ถ้ามันไม่มี category อยู่ใน wp อยากให้มันสร้าง category ใหม่ขึ้นมาอัตโนมัติเลย มันต้องทำยังไงครับผมคิดไม่ออกรบกวนผู้รู้ด้วยครับ  :wanwan017:
ชื่อเรื่อง: Re: ถามเกี่ยวกับการเขียนโปรแกรม auto post ลง wp
โพสต์โดย: EchoNoMy ใน 17 สิงหาคม 2013, 19:24:34
$client = new IXR_Client($url);
$username = "$name";
$password = "$passwd";
$res = $client->query('wp.newCategory', '', $username, $password,
array(
'name' => ''.$category.'',
'slug' => ''.$category.'',
'parent_id' => 0,
'description' => ''.$category.''
)
);

ชื่อเรื่อง: Re: ถามเกี่ยวกับการเขียนโปรแกรม auto post ลง wp
โพสต์โดย: cerberuz ใน 18 สิงหาคม 2013, 13:22:06
อ้างถึงจาก: EchoNoMy ใน 17 สิงหาคม 2013, 19:24:34
$client = new IXR_Client($url);
$username = "$name";
$password = "$passwd";
$res = $client->query('wp.newCategory', '', $username, $password,
array(
'name' => ''.$category.'',
'slug' => ''.$category.'',
'parent_id' => 0,
'description' => ''.$category.''
)
);

+1 เลยครับขอบคุณครับ  :wanwan017: