Support

Account

Home Forums General Issues How to get one the_sub_field?

Unread

How to get one the_sub_field?

  • How can I change the following so I can pull only one of the_sub_field rather than the entire lot?

     <ul class="social-networks">
                                <?php while(has_sub_field('social-links', 'option')): ?>
                                <li><a href="<?php the_sub_field('link'); ?>" title="<?php the_sub_field('media'); ?>" class="icon-<?php echo strtolower(get_sub_field('media')); ?>"><span class="reader"><?php the_sub_field('media'); ?></span></a></li>
                                <?php endwhile; ?>
                            </ul>
                            <?php endif; ?>
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.