/ Published in: PHP

Dispaly a repeatable region using the Simple Fields wordpress plugin.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $childPagesRepeatedGroup = simple_fields_get_post_group_values(get_the_id(),"Child Pages", true, 2); foreach ( $childPagesRepeatedGroup as $childPage ) { $imageSource = wp_get_attachment_image_src($childPage['Pic']); ?> <div class="child-links"> <img src="<?php print $imageSource[0]; ?>" width="<?php print $imageSource[1]; ?>" height="<?php print $imageSource[2]; ?>" /> <h2><?php print $childPage['Heading']; ?></h2> <p><?php print $childPage['Text']; ?></p> </div> <?php } ?>
Comments
