Home › Forums › Front-end Issues › beginner question (acf dont show on frontpage) › Reply To: beginner question (acf dont show on frontpage)
Hi @royroy2
Based on your code, you should be able to do it like this:
<div class="container">
<div class="row">
<?php
// TO SHOW THE PAGE CONTENTS
while ( have_posts() ) : the_post(); ?> <!--Because the_content() works only inside a WP Loop -->
<div class="entry-content-page">
<?php the_content(); ?> <!-- Page Content -->
</div><!-- .entry-content-page -->
<?php
endwhile; //resetting the page loop
wp_reset_query(); //resetting the page query
?>
<?php if( have_rows('repeater_slides', 81) ): ?>
<ul>
<?php while( have_rows('repeater_slides', 81) ): the_row(); ?>
<li>sub_field_1 = <?php the_sub_field('imagem'); ?>, sub_field_2 = <?php the_sub_field('titulo_do_slide'); ?>, etc</li>
<?php
$sub_field_3 = get_sub_field('sub-titulo');
// do something with $sub_field_3
?>
<?php endwhile; ?>
</ul>
<?php endif; ?>
</div>
</div>
</div>
I hope this helps 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.