Multi site issue place holder text

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

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15196
    erminc
    erminc
    Participant

    Hello,

    We are running a multisite strategy and we have used the search plugin. it is displaying fine. The problem is when we tried to change ‘placeholder’ text in a certain site, then it is applying for all sites. We need separate placeholder text per site. can you please tell us how we can implement it ? Do we need to buy extended license or is there a option in the plugin?

    Looking forward to your answer.

    Kind regards,

    Ermin

    #15198
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    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!

    Best,
    Ernest Marcinko

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


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.