Reply To: Multi site issue place holder text

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Multi site issue place holder text Reply To: Multi site issue place holder text


Ernest Marcinko

Hi Ermin,

You don’t need an extended license, it won’t help in this case 🙂

One solution would be to have a separate search instance (shortcode) for each site, but if you have a lot of sub-sites, then this could get too complicated.

Another possibility is to use a custom javascript code snippet that will change the placeholder text based on the site ID. I have made a sample code for you. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

Quick explanation
The only thing you need to change in that code is the placeholder variable. As you can see it is an associative array, where there is a text mapped to a specific blog ID – so in case of blog ID=1, the text after the 1: is used, for blog ID=2 the text after 2: and so on.. You can add as many lines to it as you need.

I hope this helps!

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)