Skip to content

Instantly share code, notes, and snippets.

@blueprintmrk
Forked from lukecav/functions.php
Last active June 29, 2022 15:56
Show Gist options
  • Save blueprintmrk/f845a9d82919f03bc1954096137579a1 to your computer and use it in GitHub Desktop.
Save blueprintmrk/f845a9d82919f03bc1954096137579a1 to your computer and use it in GitHub Desktop.
Yoast SEO CDN Filter
function wpseo_cdn_filter( $uri ) {
return str_replace( 'http://yourdomain.com', 'http://cdn.yourdomain.com', $uri );
}
add_filter( 'wpseo_xml_sitemap_img_src', 'wpseo_cdn_filter' );
@blueprintmrk
Copy link
Author

function wpseo_cdn_filter( $uri ) { return str_replace( 'http://yourdomain.com', 'http://cdn.yourdomain.com', $uri ); } add_filter( 'wpseo_xml_sitemap_img_src', 'wpseo_cdn_filter' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment