Add a class to cancel_comment_reply_link()

The function can be found here, by default only the $text can be edited:

<?php cancel_comment_reply_link( $text ); ?>

And the default output like below:

<a rel="nofollow" id="cancel-comment-reply-link" href="/wp/template-sticky/#respond">Cancel reply</a>

Can I add class="cancel-reply" to the link?

<a rel="nofollow" class="cancel-reply" id="cancel-comment-reply-link" href="/wp/template-sticky/#respond">Cancel reply</a>
                  ^^^^^^^^^^^^^^^^^^^^

Read more here: Add a class to cancel_comment_reply_link()

Leave a Reply

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