Tagged: enfold, Placeholder
Good: On the English version of the site, the placeholder text “Search” in the searchform.php disappears as you input text (without having to erase the characters first). I was even able to remove the “Search” placeholder text by removing it in the searchform.php on my child theme.
Issue: On the Chinese version of the site, the placeholder text “搜索” must be deleted first before entering characters into the searchform input box. Also, removing the “Search” placeholder text in the searchform.php of my child theme does not affect the Chinese site. “搜索” still remains as a placeholder.
Hey Julie,
How you translated?
Have you used any plugin or you did it manually?
Best regards,
Basilis
I have not edited any of the PO/MO files. All has been manual updates. I do use WPML for language switcher – but not for translation.
Hi,
Please try this code in the functions.php file.
// search placeholder
function ava_custom_script_mod(){
?>
<script>
(function($){
$('#top #s').attr('placeholder', $('#top #s').attr('value'));
$('#top #s').attr('value', '');
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'ava_custom_script_mod');
Best regards,
Ismael
Perfect! Thanks Ismael. You are the best!
Hi!
We’re glad that Ismael was able to help! :D
For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you.
Thank you for using Enfold.
Cheers!
Sarah