WordPress comment reply link tag: comment_reply_link

WordPress template tags comment_ reply_ Link is used to output a comment reply link, which is usually used in a custom comment template.

comment_reply_link( array $args = array(), integer $comment = null, integer $post = null )

Function parameters$args

Array. The default values are as follows:

$defaults = array(
	'add_below'     => 'comment',
	'respond_id'    => 'respond',
	'reply_text'    => __( 'Reply' ),
	/* translators: Comment reply button text. 1: Comment author name */
	'reply_to_text' => __( 'Reply to %s' ),
	'login_text'    => __( 'Log in to Reply' ),
	'max_depth'     => 0,
	'depth'         => 0,
	'before'        => '',
	'after'         => ''

The available values of the $args parameter are as follows:

add_ below

String value, default value: comment

javascript addcomment.moveform () method, for example: {$add}_ Below} – {$ID}, the ID of the comment container is similar: comment-23

respond_ id

String value, default value: response

javascript addcomment.moveform () the parameters of the method

reply_ text

String value, default value: reply

The anchor text of the reply link

login_ text

String value, default value: log in to reply

Display only if you need to sign in to comment


Integer type, default value: 0

Layer series of new comments


String value, null by default

Characters added before the reply comment link


String value, null by default

Characters added after the reply comment link


Integer type, default value: null

Comment ID to display


Integer type, default value: null

The article ID of the comment to be displayed

Examples of function usage

<?php comment_reply_link(); ?>

Extended reading

comment_ reply_ The link() function is located in: WP includes / comment- template.php

Related tags:

  • cancel_ comment_ reply_ link()
  • comment_ author()
  • comment_ author_ email()
  • comment_ author_ email_ link()
  • comment_ author_ ip()
  • comment_ author_ link()
  • comment_ author_ rss()
  • comment_ author_ url()
  • comment_ author_ url_ link()
  • comment_ class()
  • comment_ date()
  • comment_ excerpt()
  • comment_ form_ title()
  • comment_ form()
  • comment_ id()
  • comment_ id_ fields()
  • comment_ text()
  • comment_ text_ rss()
  • comment_ time()
  • comment_ type()
  • comments_ link()
  • comments_ number()
  • comments_ open()
  • comments_ popup_ link()
  • comments_ popup_ script()
  • comments_ rss_ link()
  • get_ avatar()
  • next_ comments_ link()
  • paginate_ comments_ links()
  • permalink_ comments_ rss()
  • previous_ comments_ link()
  • wp_ list_ comments()
Related Article
WordPress comment date tag: comment_date

WordPress template tags comment_ Date is used to output the date of a comment, usually in a custom comment template. Read more

WordPress comment summary tag: comment_excerpt

WordPress template tags comment_ Excerpt is used to output the summary of comments. The default output is 20 characters. It Read more

WordPress comment time tag: comment_time

WordPress template tags comment_ Time is used to output the publishing time of the current comment, which is the same Read more

WordPress RSS format comment author name tag: comment_author_rss

WordPress template tags comment_ author_ RSS is used to output the comment author name in RSS format, which has no Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image