Return array of images after content
Assuming that we hit the switch statement and the page case and assuming that $all_images does indeed contain image urls: In your switch statement, try storing all the images in a variable first and then concatenate them with $content in your return statement. add_filter( ‘the_content’, ‘image_posts’ ); function image_posts( $content ) { global $post; if … Read more