[Resolved] Can’t remove URL field in comments (for posts)

Home Forums Support [Resolved] Can’t remove URL field in comments (for posts)

Home Forums Support Can’t remove URL field in comments (for posts)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2353109
    jack

    Hey GeneratePress support,

    No matter what I do, I can’t seem to remove this Website field on my site.

    https://gyazo.com/e1f8436ee5f9334be39d2ef40065c4f6

    I also want to remove the checkbox.

    I’ve tried adding a css snippet.

    .comment-form #url{
    	display:none;
    }

    I then removed the css and added a php snippet
    add_action( ‘after_setup_theme’, ‘tu_add_comment_url_filter’ );

    function tu_add_comment_url_filter() {
        add_filter( 'comment_form_default_fields', 'tu_disable_comment_url', 20 );
    }
    
    function tu_disable_comment_url($fields) {
        unset($fields['url']);
        return $fields;
    }

    Still it’s not removing the URL field. How do I remove both the URL field and the checkbox? I’d rather not add a plugin if I don’t have to.

    #2353575
    Ying
    Staff
    Customer Support

    Hi there,

    Just tested the PHP snippet, and it should work.

    How did you add the PHP snippet?

    And are you using a child theme? If so, can you switch to the parent theme to test?

    #2354059
    jack

    I just added the PHP snippet again for you to see.

    Added in functions.php
    https://gyazo.com/2ea9265f4298252e23c9a2c4c1b9f96b

    I believe I’m using the main GeneratePress theme
    https://gyazo.com/55380ca56fe9e43535189d54a65c48d8

    I’ve downloaded a template from the site library, but I don’t think that’s a child theme is it?

    I just want this URL to be removed, I’ve tried a bunch of things.

    Site is jackshelton.com and the post is https://jackshelton.com/web-development-and-design/

    #2354389
    Leo
    Staff
    Customer Support

    Looks like it’s working for me?
    https://www.screencast.com/t/S2n271EK

    #2354398
    jack

    Interesting. It could be a DNS issue on my end. I did clear my client cache several times. Glad it’s working, thanks for checking Leo.

    #2354439
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.