Support

Account

Home Forums Add-ons Gallery Field Galley disappers in combination with filter

Unread

Galley disappers in combination with filter

  • Hello all,

    I created the following page using a WordPress plugin (FacetWP) in combination with ACF: https://surfawhile.com/surf-taal-new/. I created the galleries using ACF Pro and Flexslider in order to pull images into a gallery using ACF.

    The problem is that these galleries work as long as I don’t touch the filters. However, when clicking on one of the filters the gallery disappears. I have no clue what causes the issue. This is the code that I use:

    <?php while ( have_posts() ): the_post(); ?>
    <div class="mix">
    <?php 
    
    $images = get_field('gallery');
    
    if( $images ): ?>
        <div id="carousel" class="flexslider">
            <ul class="slides">
                <?php foreach( $images as $image ): ?>
                    <li>
                        <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    <?php endif; ?>
    <div class="team-detail">
    <div class="team-heading">
    <div class="team-sub-name"><?php the_field( 'stad' ); ?></div>
    <div class="team-name"><?php the_field( 'taal' ); ?> leren + Surfen</div>
    </div>
    <div class="team-content">
    <table>
    <tr>
    <td><i class="fa fa-user-o"></i></td>
    <td><?php the_field( 'leeftijd' ); ?></td>
    </tr>
    <tr>
    <td><i class="fa fa-certificate"></i></td>
    <td><?php the_field( 'niveau' ); ?></td>
    </tr>
    <tr>
    <td><i class="fa fa-hotel"></i></td>
    <td><?php the_field( 'accommodatie' ); ?></td>
    </tr>
    <tr>
    <td><i class="fa fa-check"></i></td>
    <td><?php the_field( 'waarom' ); ?></td>
    </tr>
    <tr>
    <td><i class="fa fa-money"></i></td>
    <td>v/a €<?php the_field( 'vanafprijs' ); ?>,- per week</td>
    </tr>
    </table>
    </div>
    <div class="team-socials">
    <a href="<?php the_permalink(); ?>"><button class="normal-button">Meer informatie</button></a>
    </div>
    </div>
    </div>
    <?php endwhile; ?>

    Does anyone have an idea how to solve this issue?

    If you have any questions, please let me know!

    Cheers,

    Hans

Viewing 1 post (of 1 total)

The topic ‘Galley disappers in combination with filter’ is closed to new replies.