[Resolved] disabling website field in comment form

Home Forums Support disabling website field in comment form

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1257472
    manaadiar

    Hi there, can you pls assist with this.. I have tried many things including below code suggested in GP forums.. But it is not working on my site..

    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;
    }

    url hide in comment form

    #1257775
    David
    Staff
    Customer Support

    Hi there,

    The Filter function you have tried only works with the default WordPress comments form.
    And it looks like you’re using a plugin for that comment form. Have you checked with the plugin author?

    #1263745
    manaadiar

    Hi David, yes I did check with the plugin author.. See the point is when i go into Developer mode in Chrome and edit html and add style=display:none to the div class=”comment-form-field comment-form-url” the website field is hiding, but I am not sure how to add it to the css of the theme so it stays hidden..

    Can you assist, pls thanks..

    #1263974
    Leo
    Staff
    Customer Support

    Not sure if I understand.

    Did the plugin author offer the CSS?

    If so you can add it using one of these methods:
    Adding CSS: https://docs.generatepress.com/article/adding-css/

    I just checked a post and didn’t see any of those fields:
    https://www.screencast.com/t/Jffl0G2w

    #1264330
    manaadiar

    Hi Leo, if you look at the thread there is a screenshot of what it looks like.. Your screen shot shows the unexpanded version.. You need to click the Enter your Comment here.. block and the form will appear..

    You can see the expanded version here.. comments

    Reg the CSS i know how and where to add additional CSS.. I just was hoping you have some suggestions on how to add this particular display:none code so it can work on the live site.. it works in chrome when it is id developer mode..

    #1264763
    David
    Staff
    Customer Support

    Jetpack comments form is displayed using an iFrame being served from the jetpack website – which means you cannot edit those styles locally. The CSS changes would have to be made by Jetpack. May want to ask their support again as it seems odd you cannot disable that field.

    #1267188
    manaadiar

    There is no option under Jetpack..

    #1267356
    David
    Staff
    Customer Support

    Unfortunately there is nothing we can do to change that – you would need to ask Jetpacks support if they have added any hooks to allow that field to be removed.

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