Like buttons and like box vanished
Asked Answered
W

1

0

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>
    
Westlund answered 31/7, 2012 at 18:48 Comment(2)
Most of us would agree that we don't want to jump all over the place. Please include relevant bits of code.Undertint
Thanks, added the code for the sdk script in the head and then for the like button and like box that should be on the front page.Westlund
P
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.

Purl answered 31/7, 2012 at 19:23 Comment(2)
Thank you for taking pity on me!!!! Worked like a charm. No idea how that got deleted.Westlund
No problem @user1566639. Welcome to Stack Overflow. If this answer worked for you, please mark it as accepted per these instructions: stackoverflow.com/faq#howtoaskPurl

© 2022 - 2024 — McMap. All rights reserved.