WordPress.org

Ready to get started?Download WordPress

Forums

Spun
[resolved] Search bar question (14 posts)

  1. myosotis
    Member
    Posted 5 months ago #

    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.

  2. Andrew
    Forum Moderator
    Posted 5 months ago #

    Let's see the page with the search bar in the widget

  3. myosotis
    Member
    Posted 5 months ago #

  4. Andrew
    Forum Moderator
    Posted 5 months ago #

    For now colour it in white:

    ::-webkit-input-placeholder {
     color: white;
    }
  5. myosotis
    Member
    Posted 5 months ago #

    That works!

  6. myosotis
    Member
    Posted 5 months ago #

    Actually, it seems to work only in Chrome for me.

  7. Andrew
    Forum Moderator
    Posted 5 months ago #

    Yeah a bad solution in the long-run. Do you know, are you using a Child Theme?

  8. myosotis
    Member
    Posted 5 months ago #

    Yes, I am.

  9. Andrew
    Forum Moderator
    Posted 5 months ago #

    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 ?

  10. myosotis
    Member
    Posted 5 months ago #

    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.

  11. Andrew
    Forum Moderator
    Posted 5 months ago #

    Can you copy the "searchform.php" file from your Spun theme and paste it into your Child Theme folder?

  12. myosotis
    Member
    Posted 5 months ago #

    Yes, done!

  13. Andrew
    Forum Moderator
    Posted 5 months ago #

    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>
  14. myosotis
    Member
    Posted 5 months ago #

    It worked! Thanks again for responding so quickly.

Reply

You must log in to post.

About this Theme

About this Topic

Tags