Posts 2 Posts
[resolved] Creating child posts programatically (2 posts)

  1. rsandilands
    Posted 3 years ago #

    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.


  2. scribu
    Plugin Author

    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.