WordPress.org

Support

Support » Plugins and Hacks » Yoast SEO » [Plugin: WordPress SEO by Yoast] Canonical broken on paged results

[Plugin: WordPress SEO by Yoast] Canonical broken on paged results

Viewing 2 replies - 1 through 2 (of 2 total)
  • BUMP!

    Anyone?

    Clues how to disable the canonical on a specific template? Or (much better, of course) anyone who had this issue and have tips to solve it?

    OK, in case anyone does have this issue, what I did (probably NOT the most elegant solution) was to disable canonicals on paged results.

    In frontend/class-frontend.php I changed this line:

    $canonical = user_trailingslashit( trailingslashit( $canonical ) . 'page/' . $wp_query->query_vars['paged'] );

    To:

    $canonical = '';

    So it looks like this:

    if ( isset( $wp_query->query_vars['paged'] ) && $wp_query->query_vars['paged'] && !empty( $canonical ) )
    
    $canonical = '';

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Canonical broken on paged results’ is closed to new replies.
Skip to toolbar