• I really cant figure out how to insert another filed inside my foreach loop, i have the image variables but not sure how to incorporate it? This is what i have tried :

    <?php
     $repeatable_field_values = simple_fields_values("text_page");
     $file_id = simple_fields_values('image_post');
     $image_info = wp_get_attachment_image_src($file_id, "full");
     foreach ($repeatable_field_values as $values) { 
    
     echo " <li>
     <div class='small-12 large-6 columns text'>
     $values><div class='small-12 large-6 columns'><img src=$image_info></div>
     </li>";
     }
     ?>

    This is the content filed and it works :
    $repeatable_field_values = simple_fields_values("text_page");

    Bit the image filed im not sure how to insert it :

    $file_id = simple_fields_values('image_post');
         $image_info = wp_get_attachment_image_src($file_id, "full");

    This is how it looks like in wp admin :

    http://i.stack.imgur.com/5S0q0.jpg

    http://wordpress.org/plugins/simple-fields/

  • The topic ‘Foreach nested loop ?’ is closed to new replies.