Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

Change the search field

$
0
0

Replies: 0

Hello,

I was trying change the search field and put text in spanish keeping the theme style. I tried creating a new search_form file but nothing happens. I tried change the code inside header.php replacing <?php get_search_form(); ?> for:

<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">
    <label>
        <span class="screen-reader-text"><?php echo _x( '', 'label' ) ?></span>
        <input type="search" class="top-search-field"
            placeholder="<?php echo esc_attr_x( 'Buscar...', 'placeholder' ) ?>"
            value="<?php echo get_search_query() ?>" name="s"
            title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>" />
    </label>
    <input type="submit" class="search-submit"
        value="<?php echo esc_attr_x( 'Search', 'submit button' ) ?>" />
</form>

then I change the text but I lose the previous style :/.

I give it up, I need some help please u.u

Thanks!

  • This topic was modified 23 minutes ago by maralhua.
  • This topic was modified 21 minutes ago by maralhua.

Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>