Filter canonical URL

Since SEOPress 2.7.2

function sp_titles_canonical($html) {
//you can add here all your conditions as if is_page(), is_category() etc..
$html = '<link rel="canonical" href="https://www.seopress.org/"/>';
return $html;
} 
add_action('seopress_titles_canonical','sp_titles_canonical');

Last modified: April 14, 2018