Hi,
Normally, content can be hidden by wrapping it in div tags with class fancybox-hidden
like this:
<div class="fancybox-hidden">
<div id="john-lawrence" style="...">
example text
</div>
</div>
Since you seem to be pulling the info from several ACF fields, this could mean you need to give the wrapping div (not the one with the ID!) in the theme template this class.
I’m not clear where I should put the class. I just tried adding it and content disappeared in fancybox, too.
It’s a custom theme I’ve built starting with Underscores.
Here’s my code:
<div id="team-bios">
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="team-member">
<img src="<?php the_field('team_member_photo'); ?>" >
<h2 class="team-member-name"><a href="#john-lawrence" class="fancybox-inline"><?php the_title(); ?></a></h2>
<div id="john-lawrence" class="team-member-text">
<div class="fancybox-hidden team-member-inner">
<div class="team-short-bio"><?php the_field('team_member_short_bio'); ?></div>
<div class="team-long-bio"><?php the_field('team_member_long_bio'); ?></div>
</div><!-- .team-member-inner -->
</div><!-- .team-member-text -->
</div>
<?php endwhile; ?>
<?php endif; ?>
</div><!-- #team-bios -->
I removed the hidden class so I can begin styling the popup…
Nevermind! I actually reread what you wrote and realized my error. It works perfectly!!!
Thanks so much!!