How to disable author link in author box and comments

Posted in: Newspaper
Post count: 36

I have added code in functions.php file to disable links in comments author box in posts but not working. I am using custom post template from tagdiv cloud but not found the option to disable links in template editor. Kindly suggest what to do.

  • This topic was modified 2 years by mtdas99. Reason: To enable Notification
Post count: 27744

Hello,

Please provide more details about what you want to turn off with screenshots.

Thank you!

Post count: 36

The comment author links are clickable on the posts comment section. Please see the screenshot https://tinyurl.com/27s378y2
I have used code to disable comments in the function.php file as below:

function remove_html($comment) {
return strip_tags($comment, '<b><p>');
}
add_filter('get_comment_text', 'remove_html');
remove_filter('comment_text', 'make_clickable', 99);

But the code is not working. I think cloud templates are not effected by this code or something need to be changed or added in the code.
kindly help.

Post count: 36

This is a post from my website Banned Chinese apps list in India

Post count: 35449

Hello,
There is no need to use an extra function, for this just use this css:
.single .comment cite a {
pointer-events: none;
}

This css can be set on single post template in a raw css so it will be used only on the single post templates.
I hope this will help you!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.