Removing Page Numbers from Canonical URLs in a Multilingual Setup with Translate

[ad_1]

Hello @agumba,

Thank you for contacting Rank Math support.

To force the self-referencing canonical on your paginated pages, you may need to use this filter on your site:

add_filter( ‘rank_math/frontend/canonical’, function( $canonical ) {
$canonical = ‘https://’.$_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’];
return $canonical;
});

Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

Hope that helps.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer