Displaying repeatable field set
-
Hi there,
I am trying the following to display a series of properties:
<?php $properties = simple_fields_values("name,description,link,image"); foreach ($properties as $property) { echo "<div class='property'>"; $propname = simple_fields_value('name'); $propdescription = simple_fields_value('description'); $propimageid = simple_fields_value('image'); $propimageinfo = wp_get_attachment_image_src($propimageid, "full"); $propimageurl = $propimageinfo[0]; $proplink = simple_fields_value('link'); echo "<a href='$proplink'><img src='$propimageurl'></a>" . "\n"; echo "<a href='$proplink'><h3>$propname</h3>" . "\n"; echo "$propdescription</a>"; echo "</div>"; } ?>
However the same field values are returned for every entry.
Hoping someone can help! Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Displaying repeatable field set’ is closed to new replies.