Menu Close

Fix the pagination URL canonical problem – WordPress

Code Snippet to fix the pagination URL canonical Problem. Setup canonical URL for WordPress blogs, products(WooCommerce) and its category paginations to solve the SEO errors.
function return_canon () {
    $canon_page = get_pagenum_link(1);
    return $canon_page;

function canon_paged() {
    if (is_paged()) {
        add_filter( 'wpseo_canonical', 'return_canon' );
Posted in WordPress

You can also read...