Answer the question
In order to leave comments, you need to log in
WordPress why is the get_search_form filter not working?
I want to customize the search form using this code:
add_filter( 'get_search_form', function ( $form ) {
$form = '
<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
<label class="screen-reader-text" for="s">Запрос для поиска:</label>
<input type="text" value="' . get_search_query() . '" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Найти" />
</form>';
$form = '
<div class="widget widget_search">
<form id="searchform" method="get" role="search" action="' . home_url('/blog/') .'">
<input class="text-search" type="text" onfocus="" placeholder="Search here..." value="' . get_search_query() . '">
<input type="submit" class="submit-search" value="">
</form>
</div>';
return $form;
} );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question