Support

Account

Home Forums General Issues How to get Relationship Field dual-column showing IDs instead of post titles

Helping

How to get Relationship Field dual-column showing IDs instead of post titles

  • Hello there,

    by default, the relationship field allows the user to choose a relation with another post in the default dual column view. In my case, I am using the Relationship field in order to connect dealer post-types to products.

    Since I am importing Product data from CSV, I would need to import Relationship fields as well, and I am doing this using WP All Import Pro. If I try to export a product in order to create the proper CSV format, I can see all set up relationships using the Dealer post-type title. I would need to type in CSV the dealers IDs instead of their full title, because the titles could change at some point.

    Is that something possible through a function? Also, apart from dealers IDs, is it possible to achieve using another IDs set up using ACF (that is to say, another ID which is not the default one assigned by WP)?

    For now, I am using Post Object return format, I’ve tried with Post ID return format but does not work (I am not sure if this could work since I am trying to do something out of my knowledge…).

  • I’m a little confused by what you want to do.

    When you export you will need to export the ID of the relationship. This can be done using a function in WP All Export.

    An export usually exports what is in the DB, not what the return format is. Unless you’ve build something special for doing the export the “return value” setting will have not effect on what is being exported.

    I do not know how you can achieve an import/update under your conditions and I would contact the developers over at WPAI to see if they have any suggestions on how to do this.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.