WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Social Sharing stopped working... (2 posts)

  1. rcards
    Member
    Posted 1 year ago #

    So, last night I migrated my site from a Go Daddy hosting account to a new SIte5 hosting account (which they have been excellent support so far) and everything seems to be working as it was, except the Social Sharing option on each of my products. It was working in all my browsers, last night before the migration. Now, the icons showing are not "links" - meaning you cannot click on them, they don't do anything.

    Is there something that I am missing? Is my code bad? Do I need to turn something on in the Admin section? Any ideas?

    Here is the code that I have added to the single-product.php file in the WooCommerce directory. Just after line 34:

    <!--SOCIAL SHARE-->
    <div class="socialshare">
      <h4>Share this:</h4><ul>
    
      <li><a href="#"
      onclick="
        window.open(
          'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
          'facebook-share-dialog',
          'width=626,height=436');
        return false;"class="facebook"><img src="https://www.rcards.net/wp-content/themes/rustik/images/ico-social-facebook.png" title="Share on Facebook" alt=""></a></li>
    
      <li><a href='javascript:void((function()%7Bvar%20e=document.createElement(&apos;script&apos;);e.setAttribute(&apos;type&apos;,&apos;text/javascript&apos;);e.setAttribute(&apos;charset&apos;,&apos;UTF-8&apos;);e.setAttribute(&apos;src&apos;,&apos;http://assets.pinterest.com/js/pinmarklet.js?r=&apos;+Math.random()*99999999);document.body.appendChild(e)%7D)());'><img src='https://www.rcards.net/wp-content/themes/rustik/images/ico-social-pinterest.png'/></a></li>
    
      <li><a href="https://twitter.com/share" class="twitter" data-via="rcards" data-hashtags="rcards,greetingcards,chicago" width=626 height=436>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script><img src="https://www.rcards.net/wp-content/themes/rustik/images/ico-social-twitter.png" title="Share on Twitter" alt=""></a></li>
    
                </ul>
    			</div>

    RIght after this code is the last line of code: <?php get_footer('shop'); ?>

    Any ideas would be greatly appreciated!

    Thanks!
    Randy

  2. rcards
    Member
    Posted 1 year ago #

    UPDATE: The Social Sharing code works in Firefox.

    The code does not work (since the move to the new hosting provider) in Safari and Chrome. Newest versions of all browsers on Mountain Lion. It also does not work on Safari and Chrome browsers on iPhone or Android.

    Usually my Firefox is the one that doesn't do stuff. haha Anyone have any ideas?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic