• Resolved Alicia St Rose

    (@laughhearty)


    The popup is working. However, I still see all of the content I want hidden in the popup. I’m using advanced custom fields to get the content. Not sure if that’s an issue…

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Thread Starter Alicia St Rose

    (@laughhearty)

    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…

    Thread Starter Alicia St Rose

    (@laughhearty)

    Nevermind! I actually reread what you wrote and realized my error. It works perfectly!!!

    Thanks so much!!

    Excellent 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Inline fancybox content is still showing before link is clicke for popup’ is closed to new replies.