Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Wordpress+;中显示字段的值;PHP?_Php_Wordpress_Compiler Errors - Fatal编程技术网

如何在Wordpress+;中显示字段的值;PHP?

如何在Wordpress+;中显示字段的值;PHP?,php,wordpress,compiler-errors,Php,Wordpress,Compiler Errors,我安装了这个并创建了一个名为“想象”的自定义字段 字段出现在管理面板中,插入图像但不显示任何内容 我试图使用这段代码,但不幸的是仍然不起作用 <div class="selectat"> <div> <?php $variable = the_field( 'imagine' );?> <?php echo $variable;?> </div> </div> 只是想显示一个

我安装了这个并创建了一个名为“想象”的自定义字段

字段出现在管理面板中,插入图像但不显示任何内容

我试图使用这段代码,但不幸的是仍然不起作用

<div class="selectat">
    <div>
        <?php $variable = the_field( 'imagine' );?>
        <?php echo $variable;?>
    </div>
</div>
只是想显示一个字段的值。。。我使用正确的功能还是应该另一个

提前谢谢

_字段()
是的一部分,您已经使用了 因此,更好地使用它们的功能

例如:

$trainer_email_address = types_render_field("email",array("raw"=>"true","separator"=>";"));
就你而言

$variable = types_render_field("imagine", array("output"=>"html") );

_字段()
是的一部分,您已经使用了 因此,更好地使用它们的功能

例如:

$trainer_email_address = types_render_field("email",array("raw"=>"true","separator"=>";"));
就你而言

$variable = types_render_field("imagine", array("output"=>"html") );