Quantcast
Channel: Active questions tagged yoast - Stack Overflow
Viewing all articles
Browse latest Browse all 97

Pagination url canonical problem for other pages

$
0
0

I have a WordPress Page setup, named 'Blog', where I've added the WP Query to bring through my blog posts.

I also have pagination, setup on these pages such as:example.com/blog,example.com/blog/page/2/

But on my page 2 the canonical is still coming up as: example.com/blog

Yoast SEO is controlling this. How can I make it so that on each pagination page the canonical would be the relevant URL such as: example.com/blog/page/2/

Yoast said its meant to do this, but its not (maybe because its not an archive but instead an actual page).

This is my pagination code incase helpful:

<?php    $big = 999999999; // need an unlikely integer    echo paginate_links( array('base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),'format' => '?paged=%#%','current' => max( 1, get_query_var('paged') ),'total' => $loop->max_num_pages    ));?>

Viewing all articles
Browse latest Browse all 97

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>