Title: cancel_comment_reply_link
Published: April 25, 2014
Last modified: February 24, 2026

---

# cancel_comment_reply_link( string $link_text )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#wp--skip-link--target)

Displays HTML content for cancel comment reply link.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#parameters)󠁿

 `$link_text`stringoptional

Text to display for cancel reply link. If empty, defaults to ‘Click here to cancel
reply’. Default empty.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#source)󠁿

    ```php
    function cancel_comment_reply_link( $link_text = '' ) {
    	echo get_cancel_comment_reply_link( $link_text );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/comment-template.php#L2031)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment-template.php#L2031-L2033)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#related)󠁿

| Uses | Description | 
| [get_cancel_comment_reply_link()](https://developer.wordpress.org/reference/functions/get_cancel_comment_reply_link/)`wp-includes/comment-template.php` |

Retrieves HTML content for cancel comment reply link.

  |

| Used by | Description | 
| [comment_form()](https://developer.wordpress.org/reference/functions/comment_form/)`wp-includes/comment-template.php` |

Outputs a complete commenting form for use within a template.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 2 content](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/?output_format=md#comment-content-1384)
 2.    [Codex](https://profiles.wordpress.org/codex/)  [  10 years ago  ](https://developer.wordpress.org/reference/functions/cancel_comment_reply_link/#comment-1384)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fcancel_comment_reply_link%2F%23comment-1384)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fcancel_comment_reply_link%2F%23comment-1384)
 4.  **Basic Examples**
 5.  Default Usage
 6.      ```php
         <?php cancel_comment_reply_link(); ?>
         ```
     
 7.  Using Custom Text
 8.      ```php
         <?php cancel_comment_reply_link( __( 'Cancel Reply', 'textdomain' ) ); ?>
         ```
     
 9.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fcancel_comment_reply_link%2F%3Freplytocom%3D1384%23feedback-editor-1384)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fcancel_comment_reply_link%2F)
before being able to contribute a note or feedback.