I make sticky submit for my archive web page for customized submit kind with ACF subject and loop just isn’t working
whereas($query->have_posts() ){
$query->the_post();
$sticky = get_field('sticky', $query->ID);
?>
<?php if( $sticky ) { ?>
<div class="trip-item">
<h2 class="title-yellow mb-5"><a category="title-yellow" href="<?php echo get_permalink(); ?>"><?php echo get_the_title(); ?></a></h2>
<div class="trip-content">
<?php if ( has_post_thumbnail()) : ?>
<a category="trip-img-wrap" href="<?php the_permalink(); ?>" alt="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('full', array('class' => 'trip-img')); ?>
</a>
<?php endif; ?>
<div class="trip-txt">
<?php $excerpt = wp_trim_words( get_the_content(), 65, '<a category="link-more" href="'.get_the_permalink().'">See extra</a>');
echo $excerpt;
?>
<?php //the_content( 'Learn extra', 'class="link-more"' ); ?>
</div>
</div>
</div>
<?php }; ?>
<?php }; ?>
<?php wp_reset_postdata(); ?>