I use comment_reply_link()
function to create reply comment link but the created link is broken
the script I use:
<?php
$argsComment = array(
'reply_text' => '<img src="'. get_site_url() .'/wp-content/themes/webranko/img/SVG/reply.svg" alt="">',
'depth' => 1,
'max_depth' => 2,
);
comment_reply_link( $argsComment, $comment, $post->ID ); ?>
it's created this link:
<a rel="nofollow" class="comment-reply-link reply replyToThisComment" href="#comment-8" data-commentid="8" data-postid="239" data-belowelement="comment-8" data-respondelement="respond" aria-label="replay to Admin" data-target="c_232">
<img src="http://my-site.com/wp-content/themes/webranko/img/SVG/reply.svg" alt="">
</a>
href attribute should be a link not comment id href="#comment-8"
I make a few changes, I disable Yoast SEO Premium plugin and the replay link its work but when I activate it's broke the link
Version 7 of Yoast removes the replytocom
variables by default.
You Should add the Code in your functions.php
file
add_filter( 'wpseo_remove_reply_to_com', '__return_false' );