Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove e-mail field from “form anonymous”


  • narzan5137
    Participant

    @narzan5137

    Hi,
    I want to remove “e-mail” field from the replay form of anonymous users.
    wp-content/plugins/bbpress/templates/default/bbpress/form-anonymous.php

    I removed the website field and it works, I’m trying now to remove the e-mail field too but because it’s require filed it doesn’t work!
    If i press “submit” nothing happen at all.

    Okay from what I know i should remove this code

    <p>
    <label for="bbp_anonymous_email"><?php esc_html_e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />
    <input type="text" id="bbp_anonymous_email"   value="<?php bbp_author_email(); ?>" size="40" name="bbp_anonymous_email" />
    </p>

    after that what should I do?! 🙂

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    untried, but try adding this to your functions file

    add_filter ('bbp_before_filter_anonymous_post_data_parse_args' , 'rew_remove_mail' ) ;
    
    function rew_remove_mail ($args) {
    	$args ['bbp_anonymous_email'] = true ;
    return $args ;
    }
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar