Answer the question
In order to leave comments, you need to log in
Wordpress plugin facetwp does not check if the user is logged in when filtering?
Hello, on the site I apply post filtering using the facetwp plugin. Each post has a "details" button, which is available only to a registered user. On the initial page load, the is_user_logged_in() check works as it should, but as soon as I start applying a filter or switching pagination (also displayed via the facetwp shortcode)? then the check stops working. A button is displayed for an unlogged user even though I am logged in. What could be the problem?
Security Code
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<?php
<div class="card__btn">
<?php if (is_user_logged_in()) : ?>
<a class="button button-dark-bg button-arrow" href="<?php the_permalink(); ?>">Open details</a>
<?php else : ?>
<button class="button js-open-modal button-dark-bg button-arrow" type="button" data-modal="#register">Register to Open details</button>
<?php endif;?>
</div>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question