Jump to Comments Block

Add a button that jumps readers to your comment form, with an optional comment count.

Lauren Gray Avatar

Jump to Comments Block adds a button that sends readers straight to your comment form. You can show the comment count right in the button text, and the button hides itself on posts where comments are closed.

Before you start

  • WordPress 5.8 or later
  • PHP 5.6 or later

Install

  1. In your WordPress dashboard, go to Plugins → Add New Plugin.
  2. Click Upload Plugin.
  3. Choose the plugin zip file.
  4. Click Install Now.
  5. Click Activate.

How to use

Add the button

  1. Open a post, or a single post template in the Site Editor.
  2. Open the block inserter and add the Jump to Comments block. It’s in the Widgets category, or search for “comments” or “jump”.
  3. Type your button text. It starts as “Jump to comments”.
  4. Save or update.

On the front end, the button links to #respond, the standard ID of the WordPress comment form, so clicking it jumps down to the form.

Show the comment count

Type %count% anywhere in the button text. On the front end it’s replaced with the post’s number of comments. For example, Jump to comments (%count%) shows as “Jump to comments (12)”.

In the editor you’ll still see %count% as typed. The real number only shows on the live post.

When comments are closed

If comments are closed on a post, the button doesn’t show at all on the front end. No dead links, nothing to clean up.

Block options

  • Width (in the Settings panel): set the button to 25%, 50%, 75% or 100% of its container. Default: 100%.
  • Color: text color, background color and gradient.
  • Typography: font size, line height, font family, weight, style, letter case, decoration, letter spacing and writing mode.
  • Dimensions: horizontal and vertical padding.
  • Border: color, style, width and radius. Radius starts at 0 (square corners).
  • Shadow: any shadow your theme provides.
  • HTML anchor (in Advanced): give the block its own ID.

The button uses the same classes as the core Button block, so it picks up your theme’s button styles.

Developer reference

Coming soon: the hooks, filters and functions you can use with this plugin from your theme or a code snippet.