Like buttons and like box vanished

冷暖自知 提交于 2019-12-25 05:26:47

问题


Hate to ask about something that is most likely my fault, but am stumped. First, I am definitely NOT anything close to an actual developer or website designer. I volunteered to put together a new website for a non-profit I volunteer with since I knew more than anyone else (scary warning sign). Using wordpress (no plugins for the facebook buttons).

Was planning on going live this week, but I left to grab lunch, came back and literally all of the Facebook Like buttons and Like boxes had just vanished (they had been up and running fine for about two weeks). When I check the code with Chrome Web Developer, I see the code is all still there, but grayed out.

A good example is on the main page: www.thecarecommunities.com At the bottom of the page, there should be a Like Box between the sponsor logos and twitter feed. Another spot is on the posts such as here: http://thecarecommunities.com/gala-press-release/ There should be a Facebook Like button before the twitter button and a Like Box on the right side above the twitter feed.

I am the only one with access to the files, I have double checked the script code in the header, the code to put the buttons where they should be, and everything is still as it has been. If anyone could assist in finding the error, I would really appreciate it.

PS. current website is www.thecarecommunities.org, so most of the links are already set for the switch to the .org domain, so many go to 404 pages right now.

  1. SDK script in the header

    add_action('headway_body_open', 'fb_sdk_script');
    function fb_sdk_script () {
    ?> 
    <div>
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>  
    </div>
    <?
    
  2. Like Box on front page www.thecarecommunities.com

    <div class="fb-like-box" data-href="http://www.facebook.com/thecarecommunities"data-width="406" data-height="520" data-show-faces="true" data-stream="false"data-header="true"></div>   
    
  3. Like button that should be at the top of the home page by the twitter button

    <div class="fb-like" data-href="http://thecarecommunities.org" data-send="false" data-layout="button_count" data-width="60" data-show-faces="false"></div>
    

回答1:


There is a call to the google plus one script in your head that looks like this:

<script gapi_processed="true" type="text/javascript" src="https://apis.google.com/js/plusone.js">
  {"parsetags": "explicit"}

This script tag is not closed with a closure. It needs to be:

<script gapi_processed="true" type="text/javascript" src="https://apis.google.com/js/plusone.js">
  {"parsetags": "explicit"}
 </script>

This is blocking the subsequent script tag, which loads the Facebook SDK, from loading.



来源:https://stackoverflow.com/questions/11746950/like-buttons-and-like-box-vanished

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!