Can you please take a Look at this page (please hove over the image to see the paragraph) and let me know why the the_content()
is jumping out of paragraph tag?
echo '<p style="color:#fff !important; font-size:16px; line-height:18;">'.the_content().'</p>';
Here us the whole code
<div class="row">
<?php
$args = array( 'post_type' => 'newArraivalsCPT', 'posts_per_page' => 1000 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$thumb_id = get_post_thumbnail_id();
$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true);
$thumb_url = $thumb_url_array[0];
echo '<div class="col-sm-6 col-md-4">';
echo '<div class="thumbnail text-center demo-3">';
echo '<figure>';
the_post_thumbnail('', array('class' => 'img-responsive', 'href' =>$thumb_url));
// echo '<img src="images/image1.jpg" alt=""/>';
// echo '<img src="images/image1.jpg" alt=""/>';
echo '<figcaption class="text-center">';
?>
<h3 class=""><?php the_title(); ?></h3>
<?php
echo '<p style="color:#fff !important; font-size:16px; line-height:18;">'.the_content().'</p>';
echo '</figcaption>';
echo '</figure>';
echo '<br />';
echo '<p><a href="'.$thumb_url.'" class="btn btn-sm btn-brown group1" title="Rumi Optical" role="button">Large Image</a></p>';
echo '</div>';
echo '</div>';
echo '</div>';
endwhile;
?>
Here is an image from Chrome console