I have a post type called families where I add personal information of each family, inside the data there is an option called status.
*IMPORTANT: The fields are created with ACF CUSTOM FIELDS
These families are shown on one page each. For example
What I need is to exclude the families that do not have the status Retained, and that are not shown or linked in the next and back buttons.
in my code I have functions get_next_post_link() and get_previous_post_link()
<?php $older_link = get_next_post_link( '%link', '<i class="far fa-angle-right"></i>' ); $newer_link = get_previous_post_link( '%link', '<i class="far fa-angle-left"></i>' ); $previous = '<span class="meta-nav">Previous Post</span>'; $next = '<span class="meta-nav">Next Post</span>'; ?>
<nav class="d-flex align-items-center navigation navigation-single"> <div class="arrows"> <?php echo $newer_link; ?> <?php echo $older_link; ?> </div> </nav>
Thank you very much for your help