<?php the_field('ingredienty_v_reczepte_1', false, false); ?>
, а не через the_content.function ingredients($ingr){
if(!in_category(243)) {
$ingr = Preg_Replace_Callback('!<ol>(.*?)</ol>!si', Create_Function('$matches','Return Str_Replace("<li>", "<li itemprop=\"ingredients\" class= \"ingredient\">", $matches[0]);'),$ingr);
}
return $ingr;
}
add_filter('the_content', 'ingredients');
function ingredients($ingr){
if(!in_category(243)) {
$ingr = Preg_Replace_Callback('!<ol>(.*?)</ol>!si', Create_Function('$matches','Return Str_Replace("<li>", "<li itemprop=\"ingredients\" class= \"ingredient\">", $matches[0]);'),$ingr);
}
return $ingr;
}
a̶d̶d̶_̶f̶i̶l̶t̶e̶r̶(̶'̶t̶h̶e̶_̶c̶o̶n̶t̶e̶n̶t̶'̶,̶ ̶'̶i̶n̶g̶r̶e̶d̶i̶e̶n̶t̶s̶'̶)̶;̶
echo ingredients(get_field('название_поля'))