Yoast SEO
[resolved] [Plugin: WordPress SEO by Yoast] Bug: generation of canonical links for paginated posts (4 posts)

  1. TLA Media
    Posted 4 years ago #

    There is a bug in frontend/class-frontend.php in relation to generation of canonical links for paginated posts.

    The query variable 'page' is not included in the canonical link.

    It a simple matter of a wrong variable name. In the lines 359-361 of class-frontend.php, the variable $link should be renamed to $canonical like this:

    $canonical = add_query_arg( 'page', get_query_var('page'), $canonical );
    } else {
    canonical = user_trailingslashit( trailingslashit( $canonical ) . get_query_var( 'page' ) );


  2. TLA Media
    Posted 4 years ago #

    I can see that this will be moved into core (Ticket #18660) and hopefully by version 3.5. Would be nice though with a bug fix in the plugin before that.

  3. Joost de Valk
    Plugin Author

    Posted 4 years ago #

    Ah thanks! Just put this on the slate for 1.1.7.

  4. fighterstyle
    Posted 3 years ago #

    I'm on version 1.2.5 and I still have this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic