Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialdandrew Merriweather
1,864 PointsTrying to add an expander inside another expander
So I'm trying to add another expander inside the main expander-so subgrouping. This is a project that I'm working on
<div class="expander row">
<div class="expander-trigger"><h6>Independent Living</h6></div>
<div class="expander-content">
<?php
//this is the description of each area containing PDFs
$living = get_field( "living_desc" );
echo '<p>' . $living . '</p>';
//this checks is the row has data
if( have_rows('living_skill') ):
//this is a repeater in a while loop
while ( have_rows('living_skill') ) : the_row();
//these are sub fields
$title = get_sub_field('title');
$file = get_sub_field('file');
?>
<div class="col-xs-12 col-md-6 single-file">
<?php if( !empty($title) ) : ?>
<a href="<?php echo $file ?>"><?php echo $title ?></a>
<?php endif; ?>
</div>
<?php
endwhile;
else :
// no rows found
endif; ?>
</div>
</div>