• Resolved Anna-Karina

    (@kina60)


    Thnx for the plugin!
    After installing SSL and your plugin all my social share counters (FB, Pinterest etc.) are set to zero. I had a lot of huge numbers, so how to resolve that problem and get back the old counters?

    Thnaks,
    Anna-Karina
    Koolhydraatarmrecept.nl

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    The problem are these urls in your code:

    https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.koolhydraatarmrecept.nl
    data-a2a-url="https://www.koolhydraatarmrecept.nl
    addtoany_share_save" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.koolhydraatarmrecept.nl

    I think that these need to be replaced back to http to make it work. The code would have to be something like this (put in your theme’s functions.php):

    function rsssl_exclude_http_url($html) {
    
      $http_url = str_replace("https://", "https://", home_url());
      $https_url = home_url();
      
      $http_url_encoded = urlencode($http_url);
      $https_url_encoded = urlencode($https_url);
      
      $html = str_replace('add_to/facebook?linkurl='.$https_url_encoded, 'add_to/facebook?linkurl='.$http_url_encoded, $html);
      $html = str_replace('data-a2a-url="'.$https_url, 'data-a2a-url="'.$http_url, $html);
      $html = str_replace('addtoany_share_save" href="https://www.addtoany.com/share#url='.$https_url_encoded, 'addtoany_share_save" href="https://www.addtoany.com/share#url='.$http_url_encoded, $html);
      return $html;
    }
    add_filter("rsssl_fixer_output","rsssl_exclude_http_url");
    Thread Starter Anna-Karina

    (@kina60)

    Thanks Rogier!!
    But do you mean euh… “something like this ” or “THIS:”
    ??

    Thread Starter Anna-Karina

    (@kina60)

    Yessss it’s working!
    And the new counts on https URL are cumulated?

    Thnaks a lot!
    GRTZ
    AK

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Typing a bit too fast sometimes… ??

    Counts keep being added to the http url. As far as I know there’s no way of adding it up. You have to choose: http, or https.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Social counters set to zero?’ is closed to new replies.