canonical desable

#260291
Viewing 1 replies (of 1 total)
  • Azib Yaqoob
    Rank Math business

    Hello,

    Thank you for contacting Rank Math today.

    You can use the following filter to disable the canonical tag. Configuring it to return false will disable the tag:

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

    Looking forward to helping you. Thank you.

    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 desable’ is closed to new replies.