Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20501
    Black_Bird
    Member

    Hi,

    I like to make the field “url” or german (like on my blog) “Webseite” in my comment box invisible.

    e.g.:
    http://www.club-seduction.de/emotionen-erzeugen-beim-club-game-mit-rapport-comfort/

    Can you please help me?

    #20515
    Sakin
    Keymaster

    @Black_Bird: That is default WordPress comment form and to remove the URL/website field in contact form, you need to first build child theme of Catch Evolution theme and then create functions.php file and add the following code.

    <?php
    /**
     * Altering Comment Form Fields
     * @uses comment_form_default_fields filter
     */
    function catchevolution_comment_form_fields( $fields ) {
    	unset($fields['url']);
    	$req = get_option( 'require_name_email' );
    	$aria_req = ( $req ? " aria-required='true'" : '' );
    	$commenter = wp_get_current_commenter();
        $fields['author'] = '<p class="comment-form-author"><label for="author">' . esc_attr__( 'Name', 'catchevolution' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>';
        $fields['email'] = '<p class="comment-form-email"><label for="email">' . esc_attr__( 'Email', 'catchbox' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
            '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>'; 
        return $fields;
    	
    }//catchevolution_comment_form_fields
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Cusomize Comment Box’ is closed to new replies.