admin管理员组文章数量:1296318
header.php
<script async defer crossorigin="anonymous" src=".js#xfbml=1&version=v10.0&appId=MyAppIDHere&autoLogAppEvents=1" nonce="mZmuaaHP"></script>
Shortcode: functions.php
function print_onview_meta($atts) {
global $post;
$meta = get_post_meta($post->ID);
extract(shortcode_atts(array('key' => ''), $atts));
if($key && array_key_exists($key, $meta)) {
return $meta[$key][0];
}
}
Custom Field: wilcity_custom_new_facebook_feed
Output:
<div class="fb-page" data-href="/[onview_meta key='wilcity_custom_new_facebook_feed']" data-tabs="timeline, events, messages" data-width="500" data-height="" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"></div>
The result on page is blank, but when I have a look at the dev console it displays the exact code as in the output config above, including the shortcode etc.
What is going wrong here? Any help would be highly appreciated. (A friend told me I can configure the entire output in the shortcode with echo, but I have no idea how to do this)
本文标签: Shortcode not working inside div html
版权声明:本文标题:Shortcode not working inside div html 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741618089a2388647.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论