Wp All Import Image Serialized

289 views Asked by At

Good day to all. I have a problem with importing images in the Autoroyal theme with Wp-All Import. The theme only supports images as serialized.

This is the format of the xml:

<images>
<image>
<small>http://graphics.gestionaleauto.com/gonline_graphics/13940689_T_5f6f00abb8a0e.jpg
</small> 

which is imported as follows:

{images[1]/image[1]/small[1]},{images[1]/image[2]/small[1]} 

etc...

My question is: how can I serialize images so that the theme can recognize them? p.s.: Obviously the XML file has more images to import

a:2:{s:3: "url";s:122: "hxxp://massoli.noleggioevia.it/wp-content/uploads/autoroyal-uploads/2020/10/27-2020-Honda-CR-V-blue-CR-V-Hybrid-source.jpg";s:2: "id";s:4: "6156";}

Thank you all for your valuable help.

1

There are 1 answers

0
Tammy Shipps On

I know this is an older question but I just ran into the issue myself and found a solution that worked for me.

In my case, I wanted to import data into an Advanced Custom Field relationship field so I could associate author post objects with blog posts. Just providing the ID or title did not work.

When you import a field with WP All Import, there's a small button to the right that hides a few options. If you select Serialized, it will let you fill out a small window with keys and values and will serialize the field for you.

This is confirmed working with ACF Pro 6.2.0 and Wordpress 6.3.x and up.

Example Serialized Data