Site logo

Archived topic

Change language of search box label

9 replies · Started by Gonzalo on October 30, 2020

Viewing posts 1–10 of 10

Thank you Leo,
for this code, can I use a hook?

add_filter( 'filter_name', 'generate_search_placeholder' );
function generate_search_placeholder()
{ 
    return 'Buscar';
}

Thank you Leo, working.
In case it helps another user, I use this code with Code Snippets plugin:

add_filter( 'generate_search_placeholder', 'gs_change_search_language' );
function gs_change_search_language()
{ 
    return 'Buscar';
}

Where 'gs_change_search_language' it's my own function.

Thanks for sharing!

Hello,

I am trying to do the same thing as Gonzalo. I used his code with Code Snippets (thanks) but it doesn't seem to work. A few things:

  • I am using Relevanssi for search and asked the developer for input here
  • I don't see the original text "Search" even when I deactivate the Relevanssi plugin.

Any ideas?

Hi there,

can you raise a new topic and share a link to your site where we can see whats going on.

Glad to hear that!

This archived topic is closed to new replies.