Split: Remove Canonical URL Tag from Certain Post

#360693
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    We have split your concern to a new ticket so we can assist you accordingly. You can use this filter to remove all the canonical added by Rank Math for all of your posts:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {	
    		if(is_singular('post')){
            $canonical = false;
    		}
    	return $canonical;
    });

    The filter should be added to your active theme’s functions.php file. Here’s another way to apply the filter using the rankmath.php file:
    https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php

    I hope that helps.

    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 ‘Split: Remove Canonical URL Tag from Certain Post’ is closed to new replies.