我想在demo和download按钮等自定义字段上添加social locker
<center><p><a class="mbutton" target="_blank" href="<?php echo get_field(demo_link); ?>">DEMO</a><p></center>
<center><p><a class="dbutton" target="_blank" href="<?php echo get_field(download_link); ?>">DOWNLOAD</a><p></center>
我试着用
<?php echo do_shortcode("[lockercat]"); ?> added here buttons <?php echo do_shortcode("[/lockercat]"); ?>
。。。。。使用此locker现在可以工作,但get\\u field函数不起作用,并且像这样获取链接
实例com/post name/php echo get\\u字段(下载链接);?>
。。。。
<?php
$lockit = \'[lockercat]\' . \'<center><p><a class="mbutton" target="_blank" href="<?php echo get_field(demo_link); ?>">DEMO</a><p></center>
<center><p><a class="dbutton" target="_blank" href="<?php echo get_field(download_link); ?>">DOWNLOAD</a><p></center>\' . \'[/lockercat]\';
echo do_shortcode($lockit);
?>