Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • chenpiaw
    Participant

    can make cookie ? stop announce if visitor visit clicked the action button

    Hi @chenpiaw,

    Right now there is no option to set cookie when action button is clicked.

    I’ll add this in the upcoming versions.

    For now can you please paste the below script in anywhere in your website (like theme settings) ? This will set the cookie when action button is clicked.

    <script>
    jQuery(document).on('load', function(){
        jQuery('.ancr-btn').not('.ancr-close').click(function(){
            var ancr = jQuery(this).closest('.ancr')[0].announcer;
            ancr_state.set_cookie(ancr.close_cookie, 1, ancr.props.closed_duration, true);
        });
    });
    </script>

    And configure Announcement –> Settings –> Close –> Keep closed –> Yes and specify the days on how long it will be kept closed.

    Thanks,
    Aakash

    Hi @chenpiaw,

    This feature is added in v5.

    Please do upgrade the plugin. You will find a checkbox called “close announcement on click”. You can use that to achieve your above request.

    Announcer – Notification & message bars

    Thanks,
    Aakash

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.