WP_Query is breaking ACF the_field
-
I have an issue where Advanced Custom Fields are not displaying after my WP_Query code. I believe the issue is here
<?php $casestudy = new WP_Query( 'post_type=case_studies&posts_per_page=5' ); ?> <?php while ( $casestudy->have_posts() ) : $casestudy->the_post(); ?> <div class="col-xs-12 col-sm-3 col-md-15"> <div class="slideWork"> <a href="<?php the_permalink(); ?>"> <?php if (has_post_thumbnail()) { echo'<a href="'; the_permalink(); echo '">'; the_post_thumbnail('case-study2'); echo'</a>'; } ?> <div class="slideUpWork"> <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4> <p><?php the_excerpt(); ?></p> <a class="btn btn-default btn-sm" href="<?php the_permalink(); ?>">view project</a> </div> </a> </div> </div> <?php endwhile; ?>I am a front end person, not great with PHP.
The site is local, so you can’t view the issue, but you can view the page code here: https://bitbucket.org/snippets/niki_sebi/y8ALo
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘WP_Query is breaking ACF the_field’ is closed to new replies.