Support » Plugins and Hacks » Posts 2 Posts » [Resolved] Creating child posts programatically

[Resolved] Creating child posts programatically

  • Hi there

    I have 2 custom post types, “Actor” and “Showreel”

    An actor can have multiple child showreels. I can make this all work fine in WordPress and display an actor with their child showreels fine.

    However I’m wanting to parse an xml file that has actor information and all showreels for an actor.

    So entering actors into the wordpress database is done by parsing the xml file and using wp_insert_post

    However I’m wondering when I come to the child elements that list the associated showreels, how best to deal with them. Ideally I’d create them as child posts of the actor programmatically using posts 2 posts api but not sure if this is possible.

    Any clues appreciated.


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Creating child posts programatically’ is closed to new replies.
Skip to toolbar