Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have crated one Repeater field with four sub field, how to write code in the place of my html

for exp ,this a HTML code

<ul>
                    <li class="first">
                        <a href="service_detail.html">
                            <div class="img-blk"><img src="images/fencing1.png" class="nor" alt="" /><img src="images/fencing1h.png" class="hov" alt="" /></div>
                            <h3>Fencing</h3>
                        </a>
                    </li>
                    <li>
                        <a href="service_detail.html">
                            <div class="img-blk"><img src="images/slashing1.png" class="nor" alt="" /><img src="images/slashing1h.png" class="hov" alt="" /></div>
                            <h3>Slashing</h3>
                        </a>
                    </li>
                    <li>
                        <a href="service_detail.html">
                            <div class="img-blk"><img src="images/earth1.png" class="nor" alt="" /><img src="images/earth1h.png" class="hov" alt="" /></div>
                            <h3>Earthwork</h3>
                        </a>
                    </li>
                    <li>
                        <a href="service_detail.html">
                            <div class="img-blk"><img src="images/exca1.png" class="nor" alt="" /><img src="images/exca1h.png" class="hov" alt="" /></div>
                            <h3>Excavation</h3>
                        </a>
                    </li>
                    <li class="last">
                        <a href="service_detail.html">
                            <div class="img-blk"><img src="images/equip1.png" class="nor" alt="" /><img src="images/equip1h.png" class="hov" alt="" /></div>
                            <h3>Equipment</h3>
                        </a>
                    </li>
                </ul>
share|improve this question
    
Your question is vague at best. But if you are asking how to add a repeating field to Options Framework, then this tutorial might help –  helgatheviking Nov 12 '13 at 11:33

1 Answer 1

up vote 0 down vote accepted

Here you will find all you need to know.

http://www.advancedcustomfields.com/resources/field-types/repeater/

One example

<?php if(get_field('repeater_field_name')): ?>

    <ul>

    <?php while(has_sub_field('repeater_field_name')): ?>

        <li>sub_field_1 = <?php the_sub_field('sub_field_1'); ?>, sub_field_2 = <?php the_sub_field('sub_field_2'); ?>, etc</li>

    <?php endwhile; ?>

    </ul>

<?php endif; ?>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.