I'm setting up a real estate website, which i make listings using a custom post type 'listings' in which I have multiples metaboxes for beds, baths, and all other informations.
I use a plugin to import these posts because listings are generated from a 3d party software, (XML file with Xpaths), as far everything when ok importing listings.
The BUT is that the theme inserts images 'attached to the post' '_wp_attach_file ... file'.
The XML makes easy to get the paths to images, but I can't figured out how to make them 'be attached' to the post to load up.
Is it possible to attach them using custom fields?
(i need to do this for almost 500 posts through WP ALL IMPORT - XML XPath importer plugin - which i can insert custom_fields and metaboxes lines)
If someone knows how to do the trick, please share your secret