• This is an excellent free plugin.

    I however wanted to use it for a cookie notification bar which when closed, never reappeared (unless cookies were deleted of course)

    Unfortunately, the default expiry is when the session ends.
    To change this open wpfront-notification-bar.js

    Go to line 79 and replace

    $.cookie(keep_closed_cookie, 1, {path: “/”});

    with

    document.cookie = “wpfront-notification-bar-keep-closed=1; expires=Thursday, 31 Dec 2099 11:59:59 PM; path=/”;

    Hopefully this helps someone in the future who is trying to use this plugin to achieve the same results as me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Syam Mohan

    (@syammohanm)

    This is a great idea.

    Thank you for taking the time to do this.

    I’ll add this as a feature on my next version.

    Thanks again ??

    Thread Starter kaneatron

    (@kaneatron)

    Sounds good Syam,

    It was literally the only missing feature to make an excellent clean and functional cookie notification bar.

    https://www.kaneatron.com – If you want to see your wonderful code in action ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to keep bar closed after session ends’ is closed to new replies.