Canonical URL being overwritten

#100129
  • Resolved Eric Walasek
    Rank Math free

    I’m trying to use a content syndication plugin called: https://distributorplugin.com/ It is pretty great so far.

    This plugin automatically creates the canonical URL for the original publication site.

    However, when the RankMath plugin is enabled, this correct and auto-set canonical URL is overwritten. Have any suggestions to disable RankMath’s canonical URL function?

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for getting in touch and I am extremely sorry about the trouble this might have caused.

    You can use the following filter to either return an empty string for Rank math canonical in or assign the canonical variable to take the canonical from your custom plugin

    
    /**
     * Allow changing of the canonical URL.
     *
     * @param string $canonical The canonical URL.
     */
    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    //$canonical = ""; OR $canonical = custom _canonical_variable
    	return $canonical;
    });
    

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Canonical URL being overwritten’ is closed to new replies.