Quote:
Originally Posted by JosephFM
Now, how do I extract those images?
|
That's easy. Just add this to the "Custom Field":
and all images will be placed into the
$post['custom_fields']['url'] array. You can access them in your PHP code like this:
Code:
$post['post_content'] = '<img src="' . $post['custom_fields']['url'][0] . '" />';
or like this to display a random image:
Code:
$post['post_content'] = '<img src="' . $post['custom_fields']['url'][rand(0, count($post['custom_fields']['url']) - 1)] . '" />';