Pods - Custom Content Types and Fields
[resolved] Options for importing many values to a multi-select bi-directional relationship (2 posts)

  1. maiki
    Posted 2 years ago #

    Easy example, CPTs for Books and Book Authors. I want multiple authors on each book. I've read, and verified, that the multiple select relationship fields create serialized data in wp_podsrel.

    What are my options? Is importing serialized data straightforward, so if I could possibly figure out the correct post_ids for each book author, I could put that data in a field is a CSV file?

    I know that it was suggested in that post to use add_to, but I am not sure what that does, so I could use some guidance there (I normally work my way back from the examples).


  2. Josh Pollock
    Plugin Contributor

    Posted 2 years ago #

    The add_to method adds values to a relationship field and is what you need. If you ahve the data in an array, I would imagine you can loop that array through add_to to add each value one at a time. I've never done it, but that should work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic