Styling text and images in the_content()
I think the problem is the way you use the foreach with HTML inside. I usually use this way, so try perhaps to modify your code like this : <?php if (have_posts()) { while (have_posts()) { the_post(); the_content(); // get_template_part( ‘template-parts/content’,’article’ ); $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ … Read more