Home › Forums › General Issues › Title goes to numbers after 3 entries?
Hi all, i am making a page for houses with different pictures. Each picture has a title above it. But when i enter more then 3 images with titles the next ones go to a number?
Here you can see it happen:
Here is my ACF setup for the page:
I use floor-title
to fill in the title of the images and i did fill all of them in.
Here is my code so u can take a look
<div class="left_content contact_block">
<?php if( have_rows('floorplans_slider') ): ?>
<!-- floorplans_slider -->
<div class="floorplans_slider">
<ul>
<?php while( have_rows('floorplans_slider') ): the_row();
$title = get_sub_field('title');
$floor_title = get_sub_field('floor_title');
$image = get_sub_field('image');
?>
<li>
<h2><?php echo $title; ?></h2>
<p><?php echo $floor_title; ?></p>
<img src="<?php echo $image; ?>" alt="" />
</li>
<?php endwhile; ?>
</ul>
</div>
<!-- /floorplans_slider -->
<?php endif; ?>
</div>
Thanks for your time!
Hi @jari
Could you please debug the returned repeater value like this:
echo "<pre>";
print_r( get_field('floorplans_slider') );
echo "</pre>";
Thanks 🙂
Hi @acf-support !
Firstly, thanks for your answer!
Here you can see a image of what I am getting out of the debug:
You can see that it outputs the floor title .. but above u still see numbers instead of undefined
Hi @jari
It seems there’s something different between the code you’ve shared and the result. Could you please share the URL where the code is used and the complete code of the template? Please keep in mind that you can’t upload a PHP file to the forum, so you need to zip it first or use https://gist.github.com/.
Thanks 🙂
Hi @acf-support
Thanks for your answer again!
Here is the URL where the template is used:
http://thuisinberggierslanden.nl/woning/type-a/
And here i have the complete code for you:
http://www.filedropper.com/single-woning
Thanks 🙂
Hi @jari
It seems related to your slider. I’ve checked the page source and the HTML have the correct result:
<div class="floorplans_slider">
<ul>
<li>
<h2>INTERIEUR</h2>
<p>Woonkamer</p>
<img src="http://thuisinberggierslanden.nl/wp-content/uploads/2016/11/18980-Heijmans-A-Meppel-Interieur-Woonkamer_72dpi-e1481031034795.jpg" alt="" />
</li>
<li>
<h2>INTERIEUR</h2>
<p>Keuken</p>
<img src="http://thuisinberggierslanden.nl/wp-content/uploads/2016/11/18980-Heijmans-A-Meppel-Interieur-_72dpi-e1481031087787.jpg" alt="" />
</li>
<li>
<h2>PLATTEGRONDEN</h2>
<p>Begane grond</p>
<img src="http://thuisinberggierslanden.nl/wp-content/uploads/2016/11/gebouw-ab-v1.jpg" alt="" />
</li>
<li>
<h2>PLATTEGRONDEN</h2>
<p>1e verdieping</p>
<img src="http://thuisinberggierslanden.nl/wp-content/uploads/2016/11/gebouw-ab-v2.jpg" alt="" />
</li>
<li>
<h2>PLATTEGRONDEN</h2>
<p>Zolder</p>
<img src="http://thuisinberggierslanden.nl/wp-content/uploads/2016/11/gebouw-ab-v3.jpg" alt="" />
</li>
</ul>
</div>
<!-- /floorplans_slider -->
Could you please get in touch with your slider author instead?
Thanks 🙂
The topic ‘Title goes to numbers after 3 entries?’ is closed to new replies.
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.