How to remove text and retain in caption image using the_content function
If you are trying to remove the text i think the below code is what is adding this /// this is where your content is being inserted <div class=”strip_first_image”> <?php $content = get_the_content();$content = preg_replace(“/<img[^>]+\>/i”, ” “, $content); $content = preg_replace(“/\[caption.*\[\/caption\]/”, ”, $content);$content = apply_filters(‘the_content’, $content);$content = str_replace(‘]]>’, ‘]]>’, $content);echo $content; ?> </div> Someone with … Read more