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 @ https://businessbloomer.com/?p=19055
* @sourcecode https://businessbloomer.com/?p=20449
* @author Rodolfo Melogli
* @testedwith WooCommerce 2.6.2
*/
function design_canonical() {
global $post;
if(isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] == “on”) {
$find = ‘https://www.exampledomain.com’;
$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 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 7 years, 1 month ago by Ghostyvb13.