• Resolved queengab

    (@queengab)


    Hi,

    i’m setting up a website with untitled theme.
    Is a terrific theme and oi love it.
    Now i have a little problem.
    I’d like to change the comment form for all posts…

    Show only comment field and title leave a reply…

    I use this snipet on funxtions to remove the fields…

    /* Modifiche al comment form */
    function remove_comment_fields($fields) {
    unset($fields[‘author’]);
    unset($fields[’email’]);
    unset($fields[‘url’]);
    return $fields;
    }
    add_filter(‘comment_form_default_fields’,’remove_comment_fields’);

    But i also want to delete the form-allowed-tags div to delete also this part. And diminuishing the comment form field width.

    Comments.php isn’t my file but where can i find the right file to do this?

    Gabriele

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Queengab,

    What about using CSS display:none on the form allowed tags div to hide it from the page? You could modify the appropriate template file, but I think the cleanest option lies with CSS. You can also decrease the width of the comment form fields using CSS.

    I hope this helps ??
    – Maria Antonietta

    Thread Starter queengab

    (@queengab)

    Hi,

    i solve my first issue
    (change the comment form text area size) thanks to this article https://wpsites.net/web-design/customize-comment-field-text-area-label/

    Now perhaprs i can’t find how to don’t show form-allowed-tags div at the bottom of the page.

    Thakns
    Gabriele

    Gabriele, posta un link per accedere al tuo website per favore. Questo mi permette di identificare gli elementi HTML per nascondere la form-allowed-tags. Grazie!

    Thread Starter queengab

    (@queengab)

    Grazie Mariantonietta per seguire questo post il 13 agosto!

    My site is under costruction and isn’t now on the web.
    I’d like to avoid to use css because I’m not going to create a child theme and i’d like to change directly singles php file or by functions.php.

    Anyway this block ios inside a p with class “form-allowed-tags” so with css yes ok, it’s easy to say to class display:none. But i think is not the best solution because i want to delete the block not only don’t show it.

    But i think for now i can follow your suggest.

    Grazie mille per la tua disponibilità.
    Gabriele

    Gabriele, you don’t need a child theme to add CSS if you don’t want to. If your theme hasn’t a built-in custom CSS editor, use this great free plugin: https://www.ads-software.com/plugins/simple-custom-css/

    On the other hand, it’s when you modify template files that you need a child theme the most. In fact, when the time comes to update your theme, what happens to your customizations? They’ll be lost and your site will look broken.

    In this case, the form-allowed-tags comes from the call to comments_template(); which is a wordpress core template. Therefore, I think the easiest and cleanest way to solve this is using CSS.

    Buona fortuna e se hai altre domande posta pure ??

    queengab – are you all set with this? Looks like you got some great advice from Maria Antonietta on when to use CSS vs. a child theme!

    If you still need help, just let me know and we can take a look.

    Thread Starter queengab

    (@queengab)

    Hi to all,

    and thanks for your help.
    I definitely use css method described by antonietta. But insert my hidden class directly to css.

    Thanks!

    Gabriele

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customize comment form’ is closed to new replies.