1. Home
  2. ReHub Theme
  3. Advanced tips and customizations
  4. Make coupons only for logged users

Make coupons only for logged users

If you use Coupon functions of theme, maybe you will need to make all coupons visible only for logged users. Guests will see login/register popup when they click on Reveal button. To do this, use next snippet in Theme option – general – js code in footer

<script>
jQuery(document).ready(function($) {
$('body:not(.logged-in) .masked_coupon:not(.expired_coupon)').addClass('act-rehub-login-popup').removeClass('masked_coupon');
});
</script>

Also, don’t forget to enable Login modal in theme option – user option and enable registration on site in settings – general. See also

 

Was this article helpful to you? Yes No

How can we help?