Changing Text inside Search Box

Hi, Im using this to change the text inside a search box.

(function($){
$(“input#s”).attr(‘placeholder’, ‘Search the Blog’);
})(jQuery);

which has worked before but for some reason is not working for my site. Can you tell me whats wrong? im using PRO Icon.

Thank you,
Rena

Hi there,

Thanks for writing in.

I assume that it was applied on X theme? In that case, please provide your site’s URL for further checking. The Pro uses a builder in which you can create content the way you want it and due to that it could vary from setup to setup. And that code will surely fail.

Thanks!

Yes I am using Xtheme, Pro, Icon. My site is palilastudio.com

Appreciate the help!

Hi Rena,

I tried checking the site but I can’t seem to find the search box that you have mentioned even on the blog page.

Would you mind letting us know the link to the page where it is on so that we can check?

Thank you.

sorry about that. Its on this page: https://palilastudio.com/long-island-seo/

Hi again,

Your code should work fine but there is an error in your Customizer that is preventing the code to work, please navigate to Appearance > Customize > Custom > Edit Global Javascript and remove the <script> tags from the Customizer as they are automatically added. For now you can remove everything from the Customizer and keep the following code only:

(function($){
$("input#s").attr('placeholder', 'Search the Blog');
})(jQuery);

Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.