I have been killing myself trying to figure this out on my own. And I for the life of me cannot figure out what is causing my issues.
I created a template for the testimonials page and used custom post types to fill the content. Everything looks great until I add the side bar then it creates a big gap the length of the sidebar between the first testimonial and the 2nd. And then they start formatting and showing up with the correct amount of space between each one.
I can get it to look fine and correct in HTML however once I bring it into wordpress it doesn't want to format correctly. Any ideas as to what could cause this? Thank you all in advance!
Screenshots: 1st one is html page that is "working" 2nd is what the wordpress page looks like with the gap.
get_header(); ?> <?php $loop = new WP_Query ( array ( 'post_type' => 'testimonials', 'orderby' => 'post_id', 'order' => 'ASC') ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post() ?> <section> <div class="container"> <div class="row"> <div class="col-12 col-md-8"> <!-- Testimony --> <div class="row testimonials"> <div class="col-10"> <h5> <?php the_content(); ?> <cite>— <?php the_title();?></cite> </h5> </div> </div> </div> <div class="col-md-4"> <?php get_sidebar(); ?> </div> <!-- col --> </div> <!-- row--> </div> <!-- container --> </section> <?php endwhile;wp_reset_query(); ?> <?php get_footer();