Custom post type divs
-
I’m using a custom post type but when i run the loop the content is being wrapped in 2 divs. How do i stop this from happening?
This is the Loop:
<?php $loop = new WP_Query( array( 'post_type' => 'testimonials') ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <div class="entry-content"> <?php the_title(); ?> <?php the_content(); ?> </div> <?php endwhile; wp_reset_postdata(); ?>
This is the result:
<div class=”entry-content”>
Header
<div>
<div>
Post content
</div>
</div>
</div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom post type divs’ is closed to new replies.