add_filter('the_content', function($content){
// Тут регулярки
return $content;
});
if (have_posts()) : while (have_posts()) : the_post();
$content = get_the_content();
// Тут тоже регулярки))
if (have_posts()) : while (have_posts()) : the_post();
ob_start();
the_content();
$content = ob_get_clean();
// Тут тоже регулярки))
/* Restore original Post Data
* NB: Because we are using new WP_Query we aren't stomping on the
* original $wp_query and it does not need to be reset with
* wp_reset_query(). We just need to set the post data back up with
* wp_reset_postdata().
*/
wp_reset_postdata();