Search bar question
-
I added a search bar to the widget, and can’t find where to remove the word ‘search’, which gets odd in a bilingual site.
-
Let’s see the page with the search bar in the widget
For now colour it in white:
::-webkit-input-placeholder { color: white; }
That works!
Actually, it seems to work only in Chrome for me.
Yeah a bad solution in the long-run. Do you know, are you using a Child Theme?
Yes, I am.
I’ve never used the search bar in a widget before, does this look like the right template: http://themes.svn.wordpress.org/spun/2.0.2/searchform.php ?
I don’t really know php, so I couldn’t tell from just looking at the code. I just added the widget and assumed it would add the template search bar.
Can you copy the “searchform.php” file from your Spun theme and paste it into your Child Theme folder?
Yes, done!
Then edit your “searchform.php” file in your Child Theme and replace all of the code with this:
<?php /** * The template for displaying search forms in Spun * * @package Spun */ ?> <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search"> <label for="s" class="screen-reader-text"><?php _e( 'Search', 'spun' ); ?></label> <input type="text" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" /> <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Go', 'spun' ); ?>" /> </form>
It worked! Thanks again for responding so quickly.
- The topic ‘Search bar question’ is closed to new replies.