• blogodisea

    (@blogodisea)


    Hi, i want to know if it’s possible to quit or hide the link of person who left a comment. As you know, if a person leaves a comment adding a URL, its name will appear linking to this URL.

    I want to know if it’s possible to break the links of the comments using the theme, and that it just appears the name of the person, but not linking.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Leo

    (@leohsiang)

    Thread Starter blogodisea

    (@blogodisea)

    Thank you, i added the code to funtions.php but it didn’t worked.

    Still didn’t made any child theme for GeneratePress, don’t know if that has something to do for not working.

    Leo

    (@leohsiang)

    Never a good idea to modify the parent theme’s function.php

    Can you try the child theme method as mentioned above?

    Thread Starter blogodisea

    (@blogodisea)

    Sorry, didn’t made a child theme before, maybe i will try.

    Aside that, i found a solution that can be helpful for more people to control spam comments. It has to be added to functions.php

    1) This code will unlink any old comment author name from the blog:

    function no_comment_author_url( $url, $id, $commentr ) {
    return “”;
    }
    add_filter( ‘get_comment_author_url’, ‘no_comment_author_url’, 10, 3);

    2) And this code will take off the field URL when a user is leaving a comment. This way there’s no way to introduce spam URLs in any new comment.

    add_filter(‘comment_form_default_fields’, ‘website_remove’);
    function website_remove($fields)
    {if(isset($fields[‘url’]))
    unset($fields[‘url’]);
    return $fields;}

    Leo

    (@leohsiang)

    Sounds good thanks for sharing!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Link in comment name’ is closed to new replies.