Site logo

Archived topic

customize search bar

34 replies · Started by francesco on January 8, 2023

Viewing posts 31–35 of 35

I tried deleting this line, but it doesn't seem to work.

placeholder="<?php echo esc_attr( apply_filters( 'generate_search_placeholder', _x( 'Search &hellip;', 'placeholder', 'generatepress' ) ) ); ?>"

Have you tried editing that search block as I suggested?

forgive me ying but how do I edit that search block? customizer?

thnx ying i understand..

add_filter( 'generate_navigation_search_output', function() {
    printf(
        '<form method="get" class="search-form navigation-search" action="%1$s">
            <input type="search" placeholder="...." class="search-field" value="%2$s" name="s" title="%3$s"  />
			<button class="nav-search-button">Search</button>
        </form>',
        esc_url( home_url( '/' ) ),
        esc_attr( get_search_query() ),
        esc_attr_x( 'Search', 'label', 'generatepress' ) 
    ); 
} );

Awesome :)

This archived topic is closed to new replies.