Support » Plugin: Cresta Social Share Counter » Lost share counts after moving to https

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author CrestaProject


    Hi @dayleedreamer
    yes, Facebook (and other social networks) consider http and https as a 2 different URLs and then use a new counter.
    Facebook has a way to “move” the shares from one URL to another, here’s the documentation
    Is a bit complicated but I think it is the only solution.

    Best Regards,

    I have this same problem, can you give me some pointers on how to proceed and make it work?

    Based on what i read i you need to change the og:url and/or canonical url. I found to function.php snippets that changes the https to http…. But i did not get any positive on the shares side, but it did change the meta data.

    ———SNIPPETS————–I left in the comments because i did not write the code.

    * @snippet Move & Change Number of Cross-Sells @ WooCommerce Cart
    * @how-to Watch tutorial @
    * @sourcecode
    * @author Rodolfo Melogli
    * @testedwith WooCommerce 2.6.2

    function design_canonical() {
    global $post;
    if(isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] == “on”) {
    $find = ‘’;
    $replace = ”;
    $theurl = str_replace($find,$replace,get_permalink($post->ID));
    return site_url( $theurl , ‘http’ );
    } else {
    // Leave blank and Yoast SEO will use default canonical for posts/pages

    add_filter( ‘wpseo_canonical’, ‘design_canonical’ );

    /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
    /* Enforce HTTP Open Graph URLs in Yoast SEO
    * Credit: stodorovic
    * Last Tested: Feb 06 2017 using Yoast SEO 4.2.1 on WordPress 4.7.2

    add_filter( ‘wpseo_opengraph_url’, ‘my_opengraph_url’ );
    function my_opengraph_url( $url ) {
    return str_replace( ‘https://’, ‘http://’, $url );

    • This reply was modified 2 years, 3 months ago by Ghostyvb13.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lost share counts after moving to https’ is closed to new replies.