1

My debugging output below

Array ( 
    [0] => Array (
         [re_text_field_id] => No posts to display
         [re_textarea_field_id] => boring jokes
         [re_image_field_id] => Array (
             [id] => 6
             [src] => http://localhost/project/wp-content/uploads/2014/02/bg1.gif
        )
    ) [1] => Array (
         [re_text_field_id] => fuck it
         [re_textarea_field_id] => I feel dumb for asking, but how on earth would i go about using the repeatable fields in a way which outputs the fields needed
         [re_image_field_id] => Array (
             [id] => 4 [src] => http://localhost/project/wp-content/uploads/2014/02/bg-gradient1.png
         )
     )
 )

To get text field I used

$options = get_option('demo_options')
$slides = $options['re_']; 
foreach ($slides as $slide) {
echo $slide['re_textarea_field_id'];
}

But I am unable to get image path somewhat like this way

echo $slide['re_image _field_id'];
0

1 Answer 1

1

Try this, to retrive the path of the image. Need to add ['src']

echo $slide['re_image_field_id']['src'];
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.