[Plugin: Simple Fields] Getting images in repeatable fields
-
Hi !
I thought I was right with this code :<?php $major_features = simple_fields_values("major_feat_title,major_feat_image,major_feat_link,major_feat_anchor"); foreach ($major_features as $major_feature) { $file_id = simple_fields_value('major_feat_image'); $image_info = wp_get_attachment_image_src($file_id, "full"); $image_url = $image_info[0]; $post_id = simple_fields_value('major_feat_link'); $post_url = get_permalink($post_id); echo "<li style='background-image: url($image_url)'><p>" . $major_feature["major_feat_title"] . "</p><a href='$post_url#" . $major_feature["major_feat_anchor"] . "'>" . __('En savoir plus',superprotobeef2) . "</a></li>"; } ?>But I get only the image of the first occurrence repeated for each…
Thanks for your help !
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘[Plugin: Simple Fields] Getting images in repeatable fields’ is closed to new replies.