Skip to content

Wrong anchor on comment navigation links #40

Description

@splorp

If comments are set to display across multiple pages (Settings > Discussion > Other comment settings > Break comments into pages …), the anchor associated with the next and previous comment navigation is incorrect. By default, the anchor is defined as #comments in the WordPress core.

The anchor needs to be changed to #comment to match the ID used on the comment form wrapper.

function get_comments_link($post_id = 0) {
    return get_permalink($post_id) . '#comments';
}

This function is found in comment-template.php.

There are also references to #comments in feed-atom.php and link-template.php … which is odd, because every other reference to the comment form anchor in the current WordPress core points to #respond.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions