search form placeholder question
-
Hi,
I noticed strange issue related to the search form placeholder text. I use this code for the search form on my site:<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ) ; ?>"> <label> <span class="screen-reader-text">Search for:</span> <input required type="search" id="search-field" class="search-field" placeholder=<?php echo pll__('Search for'); ?> value="" name="s" title="Search for:" /> <span class="fa fa-search"></span> </label> <input type="submit" class="search-submit" value="Search" /> </form>
I have registered the ‘Search for’ string with pll_register_string in my functions.php file and I have translated it as usual in Polylang “String translations” section, but the placeholder always remains “Search” and not “Search for” in English Language. The same behavior for Italian language. It remains “Cerca” and not “Cerca qui”.
What can I do to solve the issue?
- The topic ‘search form placeholder question’ is closed to new replies.