• Resolved webtasky

    (@george9)


    Hi!

    I’m experiencing issue with canonical URLs. If I set it for a post it also set the same value for og:url in <head>. Is it possible to change this behaviour and keep post URL for og:url?

    Best Regards
    George

Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi George,

    For The SEO Framework, the meta canonical URL and the og:url tags are of the same value. We do this because we don’t want to litter your dashboard with hundreds of options, which is for many seen as “redundant bloat.”

    Now, there is a straightforward workaround. Implement the following filter in your site:

    add_filter( 'the_seo_framework_ogurl_output', function( $url ) {
    	return the_seo_framework()->get_current_permalink() ?: $url;
    } );
    

    (Where to place filters?)

    Be sure to flush the cache of your caching plugin after you add it (if any). Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Canonical URL’ is closed to new replies.