Archived topic
Activate or implement Filters for Search translation
4 replies · Started by Nick on October 15, 2014
Hey Guys,
hi Tom,
i'm quite sure that's a newbie-question :-) ... but how could i implement the filters? I mean this set:
http://www.generatepress.com/knowledgebase/filter-list/
I'd like to change the "Search for" ("Suche nach") and "Search" ("Suchen") button into my language (german).
Greetings,
Nick
Hi Nick,
Those words should already be translated into German if you have that set as your language.
Are they not translating for you?
Hey Tom,
nope, sorry, that won't work for my site. My wordpress language is german. Is there any clue in generatepress to modify the language?
Greetings, Nick
Your WordPress is in German and the Search text isn't translating? Something weird happening there.
Anyways, using filters works like this:
First, create a new plugin using Pluginception: https://wordpress.org/plugins/pluginception/
In that file, add this:
add_filter('generate_search_placeholder','generate_custom_search_placeholder');
function generate_custom_search_placeholder()
{
return 'Suche..';
}
That should do it.
Nice, thanks for the code. You could close the thread! :-)