Displaying image field
-
Hi,
i need to retrieve all the elements from an image, url, alt, title etc…
i am displaying is as slider images in a complex field
this is my codefunction wst_display_slider($layout){ if($layout['crb_slider_images']){ $slide_ids = $layout['crb_slider_images']; foreach ( $slide_ids as $slide_id ) { var_dump($slide_id); $slide = wp_get_attachment_image_src($slide_id,'full'); var_dump($slide); } } }
the id are there, but i don’t know how to retrieve the info to display the images and attributes
the $slide var_dump give me bool false ??
also i know i have to escape or sanitize, but i don’t know which function to use
it would be really nice to have examples in the doc of how to display each type of field
Thanks in advance
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Displaying image field’ is closed to new replies.