New Landing How can we help? Themeforest Theme Support Clique How to Remove Twitter and Facebook Functions?

  • This topic has 2 replies, 2 voices, and was last updated 11 years by kotebo.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Posted in: Clique
  • #6102
    kotebo
    Member
    Post count: 16

    First of all, awesome awesome theme. On to my request for help…

    I’m trying to remove the Twitter and Facebook functions on my site completely without affecting functionality of other processes. In my attempt to stop the JS from loading I tried removing the following code from the header.php but as a result I get the spinning AJAX wheel when I navigate to my portfolios. I’m sure its because the single portfolio template file uses FB, TW and other like functions. I also tried renaming the widgets related as mentioned in the functions file path “/widget-flickr.php” and “/widget-twitter.php” but doing so results in PHP errors. How can I obtain the results I need? Reason behind doing this is that the site loads 80% faster without FB and TW due to the GFC in China ๐Ÿ™‚

    ::::

    <!– OPEN Social Scripts –>
    <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_GB/all.js#xfbml=1&appId=102602873192256″;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));
    </script>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=”//platform.twitter.com/widgets.js”;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);</script>
    <!– CLOSE Social Scripts –>
    :::::::::::::::::::::::

    #6136
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    If you remove the scripts, you’ll also need to edit /js/functions.js.php file and remove instances of:

    twttr.widgets.load();
    try {
        FB.XFBML.parse(); 
    } catch(ex){}
    

    Don’t worry about the widgets.

    – Ed

    #6168
    kotebo
    Member
    Post count: 16

    Perfect! Issue solved. Thanks a lot Ed ๐Ÿ™‚

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register