如果您的ACF“\\u tl”位于选项页上,则不必使用链接(ob_start(); , $content = ob_get_contents(); ob_end_clean();).
您只需要在have_rows函数中指定包含此字段的页面,在您的情况下,它是Option 页因此:
if( have_rows(\'_tl\',\'option\') ):
...
while( have_rows(\'_tl\',\'option\') ): the_row(); ?>
而不是
echo 最好使用此结构:
$out = \'\';
$out .= \'<table class="">\';
$out .= \'...\';
$out .= \'</table>\';
return $out;