Skip Navigation

[Resolved] Exporting hidden meta fields

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2020755
Capture3.JPG
Capture1.JPG
Capture2.JPG

Tell us what you are trying to do? I am trying to make an export of a posttype(reports) with wp all export and i want to include the relationship meta keys. However these fields do not show up in the field selection. I i add them manually i also get no values. I think these fields are hidden because they also have an _ in front of the name. But i do get other fields with_ that were also created with toolset.

In a regular wp export i do see the fields (capture1.jpg). If i do an export with wp all export i dont see the values(capture 2)

Is there a way for me to be able to see the fields in wp all export? Or can you provide me with a php function to pull this information out of the database (see capture 3)

Also it would be really nice to have this feature to export relationships by default. The Toolset import add-on for wp all export is very nice, but it seems only half a solution if you can't easily export.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
hidden link

#2021677

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

Toolset stores the post-relationship information in its specialized tables, which is why you're not seeing connection information in meta keys/custom fields.

To understand how to export the related posts information, you'll first need to understand how Toolset would expect it during the import process. The following guide on the topic will make this more clear:
https://toolset.com/course-lesson/importing-content-from-csv-with-post-relationships/#how-toolset-associations-can-be-added-to-a-csv

In summary, in your export file, you'll need to include the title of the parent post, as a value in the custom meta key in format "_toolset_associations_%relationship_slug%", with each child post.

If you have a large number of post connections to export, you can use the "toolset_get_related_posts" function ( https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_posts ).

You'll create a custom function that can loop through all the child posts, retrieve the titles of their related parent posts, and then set them in the custom field in the mentioned format:

As a result, when you'll create the export file, your relationship connections will be included in the form of custom fields which will be recognizable after the import.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2021969

Hi Waqar,

thank you for your response. thank you for showing me the way to do this. I will have to send this to my php developer so he can create a function to do this. I dont think i will need any more help. Otherwise i will contact you again.

Kind regards,

Glenn

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.