Looking to automatically separate the images and text from my wordpress post <?php the_content(); ?>
so I can put them in two different locations.
Not sure the best method to do this but have tried preg_replace approach but cant seem to figure out the right input
<?php
// get the content
$block = get_the_content();
// check and retrieve blockquote
if(preg_match ...
?>
It's answered here on wordpress.stackexchange.
To get the images from the inline post content this article will help.
You need to build a new function with the_content() to filter media and string from post content.
To do it, You should to know php well.