This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Remove the website field in Comment Form

  • Creator
    Topic
  • #1076
    gregfields
    Participant

    What is the proper way to remove the Website field in the Comment Form in Jumpstart?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #1077
    Jason Bobich
    Keymaster

    Arguments passed into WordPress’s comment_form function are filtered with “themeblvd_comment_form” — And you can find their default setup by the framework by looking at the function themeblvd_get_comment_form_args found in this file:

    /framework/frontend/functions/helpers.php

    And here’s how you’d use it to remove the Website URL field from your Child theme’s functions.php:

    function my_comment_form( $args ){
    	unset( $args['fields']['url'] );
    	return $args;
    }
    add_filter( 'themeblvd_comment_form', 'my_comment_form' );
    #1078
    gregfields
    Participant

    Thanks for the super fast response, Jason! That worked perfectly.

    #24232
    Robert Piller
    Participant

    Any idea why this code isn’t working for me in the latest Jumpstart? I’ve tried disabling all plugins and removing everything else in my child functions.php.

    The code doesn’t work on an empty test site running Jumpstart 2.0.1 either.

    As a side note, when I try to update to 2.0.3, I get an error: “An error occurred while updating Jump Start: Update package not available.”

    Thanks!

    #24237
    Jason Bobich
    Keymaster

    There’s now a default filter in WordPress for this, comment_form_default_fields

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

    As a side note, when I try to update to 2.0.3, I get an error: “An error occurred while updating Jump Start: Update package not available.”

    I’m not sure on that one. I just put your purchase code into a local site on my end to test the update process, and it worked fine. Maybe you just encountered a temporary glitch trying to connect to my server? Maybe try to clearing out your license key, re-saving it in there, and activating it again?

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