• Resolved BHD

    (@bhd)


    I see this repeated over and over, but all suggestions on how to fix this problem do not seem to work with WP 3.4.1, using theme twentyeleven.

    I am not a coder, and cannot understand how to make changes to core code, and doing that is not recommended, anyway.

    What I want to do is to entirely remove the “website” box in the comments field, providing NO opportunity for anyone to enter a website when providing a comment. The only URLs/websites that I get in comments are from spammers (and I have installed “bad behavior,” “askimet” and related plug-ins to block or trap those things.)

    My comments.php has no field any more that I can remove for the website/url field.

    I am baffled beyond belief at what I am reading on changing the functions.php or calls to a comment form… somewhere.

    All I want is a simple solution on how to remove the website url field from comments.

    I would follow up on previous posts that I have found about this issue in this forum to explain that past suggested solutions for this issue do not work for this version of WordPress for me, but those forum posts are closed to new comments. Please accept my apologies for having to ask again and open yet another dialogue on this issue which should not have to be so complicated. Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • popper

    (@julialasarte)

    You could try adding a filter to your functions.php. A basic idea would be:

    add_filter('comment_form_default_fields', 'url_filtered');
    function url_filtered($fields)
    {
      if(isset($fields['url']))
       unset($fields['url']);
      return $fields;
    }
    Thread Starter BHD

    (@bhd)

    popper, thanks for the suggestion. You did not advise where to insert this code in the functions.php file. I tried inserting it at the end, and when I did, it caused my whole blog to crash. Fortunately, I kept a backup of the old functions.php file so I got the blog working again.

    Any other ideas? I can’t believe I am the only one who has this issue — not wanting the ability for a commenter to have a URL (“website”) field. It used to be an easy fix with removing/commenting out one line of code in the comments.php file, but with the “improvement” with WP, that doesn’t work any more, either.

    I’m still stumped. More advice with very specific suggestions on what to change and exactly where would be appreciated very much.

    Alternatively, you could install the Spamgone plugin that removes the URL/Website field from the “Post Reply” page. You’ll probably like the feature of rejecting reply that has specified a URL, such as spammers’ automated replies that clutters the blog.
    Here’s the link for the SpamGone plugin…

    Thread Starter BHD

    (@bhd)

    Cr00zng: thanks for trying. I installed SpamGone plugin, but found that it failed me. It will not allow me to reply to comments posted by others. I tried replying to a comment today, and got the error that a website URL is not permitted. I didn’t even enter one.

    I deactivated the plugin since it won’t let me reply to comments.

    I am very disappointed that WordPress won’t allow editing out the website URL from the comments code like it used to.

    What else can I do since SpamGone doesn’t work for me?

    Moderator keesiemeijer

    (@keesiemeijer)

    the code from popper works for me (also using twentyeleven). try inserting it in functions.php after the opening php tag: <?php

    btw:
    consider creating a child theme instead of editing Twenty Eleven directly – if you upgrade the theme all your modifications will be lost.

    Thread Starter BHD

    (@bhd)

    keesiemeijer, thanks for trying. When I did exactly what you suggested, inserting the code from popper right after the <?php tag, it caused the whole blog to crash again.

    This is the error message:
    Fatal error: Call to undefined function add_filter() in /..path../wp-includes/functions.php on line 2

    I had to restore my old functions.php file from a backup to get the blog working again.

    Any other ideas?

    Moderator keesiemeijer

    (@keesiemeijer)

    Did you put the code in twentyeleven’s functions.php (wp-content/themes/twentyeleven/functions.php) or in the functions.php in the wp-includes folder? It needs to go in the functions.php in the twentyeleven theme folder.

    Thread Starter BHD

    (@bhd)

    keesiemeijer, thank you very much for working patiently with me. I did not realize that there were two functions.php files in different places.

    Yes, you were correct in assessing that I had not made the code change that popper suggested in the right place.

    I added popper’s code to the functions.php file in the wp-content/themes/twentyeleven folder, and it is working.

    I will learn more about creating a child theme so that I don’t have to go through this again and again when WordPress is updated.

    Thank you very much. Lessons learned for this old hobbiest who is not a programmer.

    Moderator keesiemeijer

    (@keesiemeijer)

    You’re welcome. I’m glad you got it resolved 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove website url option from comments’ is closed to new replies.