Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/06/2012, 17:55
experimenta
 
Fecha de Ingreso: abril-2010
Mensajes: 159
Antigüedad: 14 años
Puntos: 11
taxonomias en xmlrpc o wp_insert_post()

Hola.

Bueno necesito de su ayuda con un problema que me urge solucionar lo mas pronto posible.
En mi blog agrego entradas remotamente con xmlrpc y queria prguntarles como puedo agregar taxonomias ya que mi blog tienen
por ejemplo categoria TV y dentro las taxonomias Infantil, Deportes, etc que se clasifican cada entrada que agrego
son como una categoria segundaria.

bueno y no veo la forma de clasificar mis entradas por ejemplo categoria TV y sub deportes mediande xmlrpc.
Código PHP:
$content = array(
'title'=>$title,
'description'=>$body,
'mt_allow_comments'=>1,
'mt_allow_pings'=>1,
'post_type'=>'post',
'mt_keywords'=>'tv en vivo,otros tags mas',
'categories'=>array('TV'
como pueden observar con eso agrego las entradas pero necesitaria agregar las taxonomias para clasificar la entrada de categoria TV.
con esto con wp_insert_post() es mas lento que xmlrpc pero si hay una solución pues bienvenida sea!
Código PHP:
$post = array(
'comment_status' => 'open'// 'closed' means no comments.
'ping_status' => 'open'// 'closed' means pingbacks or trackbacks turned off
'post_author' => 1//The user ID number of the author.
'post_category' => array(6), //Add some categories.
'post_content' => '[ the text of the post ]'//The full text of the post.
'post_status' => 'publish',//Set the status of the new post.
'post_title' => '[ the title ]'//The title of your post.
'post_type' => 'post'//You may want to insert a regular post, page, link, a menu item or some custom post type
'tags_input' => array("que es ",'esta vaina','etiquetas' // support for custom taxonomies.
);
wp_insert_post($post );