[Plugin: Polylang] Can't get search to work
-
When Polylang is active, the search returns no results. I’m using Twenty Eleven as a base.
I tried removing searchform.php and added
function my_search_form( $form ) { $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" > <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label> <input type="text" value="' . get_search_query() . '" name="s" id="s" /> <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" /> </div> </form>'; return $form; } add_filter( 'get_search_form', 'my_search_form' );
in functions.php as described in https://codex.www.ads-software.com/Function_Reference/get_search_form but still no results. Works fine after I deactivate the plugin. I tried adding the search widget (isn’t that the default search form?) to no avail. I’m new to this so I’m kind of lost…
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘[Plugin: Polylang] Can't get search to work’ is closed to new replies.