This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Different search instances for different users

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Different search instances for different users Reply To: Different search instances for different users

#21723
Ernest MarcinkoErnest Marcinko
Keymaster

Hi Stefan,

Actually, this might be doable simply, because of that body class. So I’m assuming that search instance ID=1 is the one for the non-wholesale, and ID=2 is for the wholesale customers. To solve this, place both search shortcodes into the same place, where you need them.

Then, use this custom CSS code:

.asp_m_2 {
     display: none !imporant;
}

.wholesale_customer .asp_m_1 {
    display: none !important;
}

.asp_m_2 {
     display: block !imporant;
}

If you have different search bars with different IDs, then just change the numbers in the code.

This is also doable with a single search bar & a different custo mcode, if it is somehow possible to check programatically if the current customer is a wholesale customer, but I think this should work as well.