Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove "search these" text from search form?

  • Avatar of CC-Cailin
    CC-Cailin
    Participant

    @cc-cailin

    This is my search form code:

    <form action="<?php echo bp_search_form_action(); ?>" method="post" id="search-form">
    <label for="search-terms" class="accessibly-hidden"><?php _e( 'Search for:', 'buddypress' ); ?></label>
    <input type="text" id="search-terms" name="search-terms" value="<?php echo isset( $_REQUEST['s'] ) ? esc_attr( $_REQUEST['s'] ) : ''; ?>" />
    <?php echo bp_search_form_type_select(); ?>
    <input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ); ?>" />
    <?php wp_nonce_field( 'bp_search_form' ); ?>
    </form>

    How do I remove “search these” text that appears next to the select dropdown?

Viewing 1 replies (of 1 total)
  • Avatar of Henry
    Henry
    Participant

    @henrywright-1

    You can filter bp_search_form_type_select.

    This will be the general idea:

    function my_select_filter ( $selection_box ) {
        // do your filtering here
        return $selection_box;
    }
    add_filter( 'bp_search_form_type_select', 'my_select_filter' );

    Once you’re done, pop it in your theme’s functions.php file.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.