Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    Same for me. For now I’ve change canonical on couple posts, to point to http version. You can find it in settings tab when editing your post.
    Is there a way to change canonical for all post pointing to http url? I can’t imagine doing it for 600 posts manually.

    Thanks!
    Anna

    Plugin Support amboutwe

    (@amboutwe)

    Please review this knowledge base article: Changing the og:url output

    Thread Starter himanshu05

    (@himanshu05)

    Thanks for the reply, but how we can add filter in Yoast SEO plugin?

    Thread Starter himanshu05

    (@himanshu05)

    Finally, my problem is resolved. I got my social count back. Thanks for giving the code. @oliwkama, just add the following code in the function.php file of your theme using your hosting panel. The sharing counts will automatically back for all of your posts.

    /* Enforce HTTP Open Graph URLs in Yoast SEO
    * Credit: stodorovic https://github.com/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://’, ‘https://’, $url );
    }

    • This reply was modified 8 years ago by himanshu05.

    Hello everybody. I use Yoast as well and I’m having some trouble on getting the og:url changed with the fix @himanshu05 posted. I added the filter in the function.php but og:url didn’t change from https to http. I need this to get back my previous Social share count after migrating from http to https (I don’t know if .httaccess rewrite of every http request to https may affect this parameter/facebook crawler).
    Anybody could help please? Thank you.

    Plugin Support amboutwe

    (@amboutwe)

    @denispoeta If you have a similar issue, please open a new request. That way it’s easier to track issues and provide assistance. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change Open Graph URLs’ is closed to new replies.