Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:47:24+00:00 2026-06-03T04:47:24+00:00

We are making a website for a client at work, which can be found

  • 0

We are making a website for a client at work, which can be found here: http://ethercreative.net/studio_social/
It’s a very simple wordpress theme, but the complications are arising with conflicts between the infinite scrolling plugin, and the social icons.

Each post is meant to display a block at the end with G+, FB and Twitter social icons inside. It is meant to display ~4 posts or so at start, and then as you scroll it is meant to load the next set.

Each of these things work, but not together.

When the infinite scroll loads the next block of posts, it only shows a facebook like button, and neither of the other two social icons.

The strange thing is though, it leaves behind blocks of the code:

<span class="icons">
                    <g:plusone size="medium" href="http://ethercreative.net/studio_social/?p=1"></g:plusone>                <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fethercreative.net%2Fstudio_social%2F%3Fp%3D1&amp;locale=&amp;layout=button_count&amp;action=like&amp;width=92&amp;height=20&amp;colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:92px; height:20px;" allowtransparency="true"></iframe>&nbsp;&nbsp;&nbsp;
                    <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ethercreative.net/studio_social/?p=1" data-count="horizontal" data-text="Hello world!" data-via="twitter_username"></a></span>
</div>

I know what the issue is and why it’s happening, but I’m really not very good with javascript and do not know what calls to use to fix it.

I am using WordPress 3.3.1, with the infinite scroll plugin (http://wordpress.org/extend/plugins/infinite-scroll/) and digg digg for the social icons (http://wordpress.org/extend/plugins/digg-digg/)

The infinite scroll plugin does have the ability to add onLoad events to run after it has grabbed the new set of posts. So what should I add here?

Thanks for any and all help in advance!
Have a nice day.


Update: After some more research, I have fixed twitter too. Now it is just Google Plus left to fix.
The code required for twitter was:

!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");

Update again: Found the Google Plus code too:

(function() {
var po = document.createElement(‘script’); po.type = ‘text/javascript’; po.async = true;
po.src = ‘https://apis.google.com/js/plusone.js&#8217;;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(po, s);
})();

What have I learnt? Do more googling before asking on Stack Overflow. At least heres the answer for people with this issue in future.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:47:26+00:00Added an answer on June 3, 2026 at 4:47 am

    The solution you presented basically is reloading the scripts, which is pretty inefficient, since you likely loaded them on page load for the first set of social buttons. All 3 of the services have a way to parse a section of the, or the entire, document to render any new social widgets. The code you want would be something like this:

    var el = document.body; 
    
    //Google Plus   
    if (typeof gapi !== "undefined") { gapi.plusone.go(el); }
    
    //Facebook
    if (typeof FB !== "undefined") { FB.XFBML.parse(el); }
    
    //Twitter
    if (typeof twttr !== "undefined") { twttr.widgets.load(); }
    

    In the above cases, el should be the container that holds the widgets or can probably just be document.body (would re-render all widgets.) Not sure if you can narrow the context with Twitter currently, but I believe they plan to add that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My website I am making for a client is here : http://vicewebdesign.com/resonantlight_com/ It works
is the start of a website i'm making for a client http://www.designobvio.us/smartklubben/ Heres the
i'm making a website where users can input some BBcodes and my owan BBcode
If another website is making a POST to my ASP.NET MVC 2 site, how
I making a website for a client that runs fine in firefox and chrome
I am making a website on asp.net MVC and I am using a repository
I'm making a website with a page where users can sign up to win
i've been making an asp website in which i'm providing the user a facility
I am making a website that uses client side XSLT to display XML data
A client's website has an auto-refresh feature which works great for desktop sites, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.