Force Jetpack to use og:url with http on an https website
I moved my site from http to https, but I wish to preserve my facebook likes. From what I read, I should use the og:url metatag so that facebook will know how to fix the likes on that page. I tried the following code, but it fails to change my urls from https to http in jetpack. Any suggestions?
function https_to_http_url( $url ) {
$url = str_replace('https://', 'http://', $url );
return $url;
}
function jetpack_og_url_https_to_http( $tags ) {
// unset( $tags['og:url'] );
$tags['og:url'] = https_to_http_url($tags['og:url']);
return $tags;
}
add_filter( 'jetpack_open_graph_tags', 'jetpack_og_url_https_to_http' );
Topic plugin-jetpack open-graph ssh facebook https Wordpress
Category Web