Jump to content
Sign in to follow this  
michelecannone

Translate "Search" in home page

Recommended Posts

michelecannone

Where is locate the "Search" code? I'd like to translate it in italian Thanks

Share this post


Link to post
Share on other sites
kastelic
It is in library.tempatlates.php around line 94. You can filter it by placing this in pagelines-customize/functions.php : [code] add_filter ('pagelines_search_form','translate_search'); function translate_search(){ $searchfield = sprintf('', __('Ricerca', 'pagelines')); $searchimage = sprintf('', apply_filters( 'pl_search_image', PL_IMAGES.'/search-btn.png' ) ); $searchform = sprintf('
%s %s
', home_url(), $searchfield, $searchimage); if ( $echo ) echo $searchform; else return $searchform; } [/code]

Share this post


Link to post
Share on other sites
michelecannone
By modifying pagelines-customize/functions.php it's wokring ok! I tryed with your filter but it gave me the url instead of the search box translated

Share this post


Link to post
Share on other sites
jbrouwer
My online site is still in platform pro. Is it possible to do this with platform pro too? Because, the same code didn't work for pp. Thanks.

Share this post


Link to post
Share on other sites
kastelic
Platform Pro i believe uses the Wordpress function get_search_form() . If you look at the bottom of this page: http://codex.wordpress.org/Function_Reference/get_search_form you can see an example on how to filter that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×