WordPress remove comment_form( 'cancel_reply_link' )?
-
Customizing my comment templates and I’m working with the
comment_form
function.https://codex.www.ads-software.com/Function_Reference/comment_form
It seems easy enough to remove some things such as the text below the form that says “you may use these tags and attributes” and other things by overwritting the defaults with blank values. However it doesn’t let you remove the
cancel_reply_link
from the template as removing its value from the array still makes it display the default.<?php comment_form( array( 'comment_notes_after' => '', 'title_reply' => '', 'comment_field' => '<textarea id="comment" name="comment" aria-required="true" placeholder="Leave a comment..."></textarea>', 'logged_in_as' => '', 'cancel_reply_link' => '' ) ); ?>
As you can see the
cancel_reply_link
is left empty, but it will still output the following HTML before my comment textarea.<h3 id="reply-title" class="comment-reply-title"> <small> <a rel="nofollow" id="cancel-comment-reply-link" href="/websites/wordpress/post-6/comment-page-1/#respond">Click here to cancel reply.</a> </small> </h3>
How can i remove this h3 and its content?
The reason I want it removed is so I can simply add a “cancel” button next to the “submit” button below the textarea when people are replying to others comments.
Thanks.
- The topic ‘WordPress remove comment_form( 'cancel_reply_link' )?’ is closed to new replies.