简体   繁体   中英

Facebook feed not working on wordpress site

I have a word press site where I need to display the facebook feed. I have installed the Facebook plugin for word press, I configured to show the desired facebook page feed, but it displays nothing. Do you have any idea what am I doing wrong? 在此处输入图片说明

This is the page where I need to display

        <div class="col-md-4">

        <div class="hidden-xs">
            <h1 id="tgb_head"><span id="facebook_icon" class="social-content-icon"></span> Facebook</h1>                 
            <div class="tab-content">

             <div class="tab-pane active fade in">
                <ul class="list-unstyled" id="facebook_ticker">
                    [custom-facebook-feed]
                </ul>
                </div>
              <div id="facebook_ticker_controls" class="ticker-controls">
                    <a href="#" class="prev pull-left" id="fprev"><span class="glyphicon glyphicon-chevron-down"></span>&nbsp; Previous</a> 
                    <a href="#" class="next pull-right" id="fnext">Next &nbsp;<span class="glyphicon glyphicon-chevron-up"></span></a> 
       </div>

       </div><!-- end tab-content -->

       </div><!-- end facebook -->

This is how it shows: 在此处输入图片说明

Thanks!

WordPress shortcodes are only parsed in content you input in the editor and send through the content filter. You can not just write [foo] in your template , and expect that to parse the shortcode.

You need to call do_shortcode in that place instead.

https://css-tricks.com/snippets/wordpress/shortcode-in-a-template/
https://developer.wordpress.org/reference/functions/do_shortcode/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM