Inject pagination parameters into permalink structure


My goal is to add a parameter to every pagination permalink:,

in order to tell Google to index all of the above as without the use of canonical meta tags.

In Google Search Console, in order to avoid indexing pagination pages I use the Google Crawl URLs Parameters tool see image below, and my permalink structure is and needs to stay as:

My pagination at the moment is:,

Since the only way to tell Google about pagination pages is via parameters (see below image of the Google Crawl URLs Parameters tool)

Search Console

I came up with the idea of adding an additional pagination parameter to my current permalink structure.

I have tried to use "paginate_links" in functions.php but it’s not working at all:

function add_page_params($link) {   
    return  array(
            'after_page_number' => '&param'
add_filter('paginate_links', 'add_page_params', 10, 2); 

I was expecting this result from the above:

The above function is not working as expected.

Mau 2 years 2020-12-21T20:10:26-05:00 0 Answers 4 views 0

Leave an answer