Forgot to mention: I want to do that in PHP, will not us a content template or view.
I do this:
$ts_gallery_images = types_render_field('docenten-afbeelding', array("output"=>"raw"));
But I do not seem to have the option to get the ID's, only the URL's or the image.
Hi, I want the actual uploaded image attachment ID.
But this night I found a solution (But it might not be the best way?)
Please let me know if there is a beter solution.
Regards, Han
// Toolset get gallery id's van docenten
function inside_ts_gallery_ids($attrs) {
if (isset($attrs['module_class'])
&& strpos($attrs['module_class'], 'ts-gallery') !== false
&& function_exists('types_render_field')
) {
global $wpdb;
$table_name = $wpdb->prefix . 'toolset_post_guid_id';
$ts_gallery_images = types_render_field('docenten-afbeelding', array('output' => 'raw'));