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' ); 

Replay

Category: facebook Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.212 (s). 12 q(s)