?replytocom issues
-
I saw a lot of URLs like this https://sample.com/hello-world/?replytocom=id in google administrator tools, so I tried to remove or disable google from including it.
I found the following code via google search and added it to my theme’s functions.php, but then I realized that after clicking reply, the user can’t reply to the comment and the URL becomes https://sample.com/hello-world/#comment-id.
I’m sorry, but I don’t know PHP.
Here’re Codes:
add_filter(‘comment_reply_link’, ‘add_nofollow’, 420, 4);function add_nofollow($link, $args, $comment, $post){
return preg_replace( ‘/href=\'(.*(\?|&)replytocom=(\d+)#respond)/’, ‘href=\’#comment-$3’, $link );I removed the code from the theme’s functions.php and this doesn’t seem to work. I restored the backup database and that didn’t work either
Can you please tell me how I can revert back to the previous URL(https://sample.com/hello-world/?replytocom=id) and enable users to reply to comments properly.
Thank you!
- You must be logged in to reply to this topic.