Afbeeldingen koppelen met producten (PHP-API)
Hoe kun je afbeeldingen in de media-bibliotheek koppelen met producten? Specifieker:
- De afbeeldingen bevinden zich al in de media-bibliotheek
- Bestaande meta-data hoeft niet aangepast te worden
- De producten bestaan al
- Afbeeldingen wil ik met meerdere producten koppelen.
Bronnen
- https://www.google.com/search?q=wordpress+php+associate+image+with+post
- https://wordpress.stackexchange.com/questions/113516/associate-an-existing-image-with-a-post/266855
- https://wordpress.stackexchange.com/questions/324243/how-do-i-programmatically-add-an-image-to-a-post
- https://developer.wordpress.org/reference/functions/wp_insert_attachment/ - Bit short
- http://man.hubwiz.com/docset/WordPress.docset/Contents/Resources/Documents/codex.wordpress.org/Function_Reference/wp_insert_attachment.html