这里是PHP初学者。
我购买了Fluent框架插件,它允许我在主题中轻松地修改帖子类型、元框和选项页面。然而,我在回显元框时遇到了困难。
Here are the official documents.我的帖子类型名称:front_page
我的HTML:
<button> <pre><?php print_r ( get_post_meta( $post->ID, \'test\', true) ); ?></pre> </button>
HTML输出:
<button>
<pre>Array ( [text] => This Is A Test ) </pre>
</button>
我的Meta(Fluent Framework):
// $meta
$meta = array();
// $meta $args
$meta[\'text\'] = array(
\'dash_icon\' => \'list-view\',
\'title\' => __(\'Section Options\', \'fluent\'),
\'description\' => __(\'This allows you to change the general settings for your new Section.\',\'fluent\'),
\'context\' => \'normal\',
\'priority\' => \'high\',
\'caps\' => array(),
\'fields\' => array(
\'text\' => array(
\'type\' => \'text\',
\'title\' => __(\'Section Style\', \'fluent\'),
\'sub_title\' => __(\'Set to small, white, grey, dark, darker, black, or parallax one-four.\', \'fluent\'),
\'required\' => true,
\'description\' => __(\'This is just a text field.\', \'fluent\'),
\'default\' => \'dark\',
\'option_name\' => \'test\',
\'seperate\' => true
),
),
);
我需要它来返回元输入的值。有人能帮我吗?我真的迷路了。
编辑:很抱歉出现第三方插件问题。。。刚发现这种事情在这里是不允许的。:)
谢谢