Hi I am trying to add gallery images to my single-plants.php template.
Although I am garbage at code I have managed to output data using this type of code which works ok.
/* Text box and label */
if(get_field(‘poisonous’)){
$field_name = “poisonous”;
$field = get_field_object($field_name);
echo ‘<p>’, ‘‘, $field[‘label’],’‘ . ‘: ‘ . $field[‘value’],'</p>’,'</br>’;}
/* Yes or No field and label */
if(get_field(‘award_of_garden_merit’)){
$field_name = “award_of_garden_merit”;
$field = get_field_object($field_name);
echo ‘‘, $field[‘label’],’‘ . ‘: ‘ . ‘Yes’,'</br>’;}
/* Checkboxes and label */
if ($features = get_field(‘spring_foliage_colour’)) {
echo ‘<br>’,’‘,’Spring Foliage’, ‘‘;
echo ‘<div class=”ticket”>’.’
‘;
foreach ($features as $key => $val){
echo ‘
- ‘.$val.’
‘;
}echo ‘</p>’.'</div>’;}
BUT .. when I come to trying to add gallery images I have no clue how to cobble the code together from the documentation to make it work in a similar way to how I have been outputting the rest of the data.
Any help would be really useful and very gratefully received.