• Resolved pf62

    (@pf62)


    Hi again!

    Are we able to get the top bar to re-appear every time the user visits the site. So if they collapse it, it stays collapsed during that visit, but on the next visit, it is open again. Or perhaps collapsing the bar remains in place for 12 hours or similar.

    Thanks again

    https://ww.wp.xz.cn/plugins/mailchimp-top-bar/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi there,

    Yes, the plugin stores a cookie whenever the bar is closed and stores this cookie for 60 days by default. To edit this, please add the following to your theme its functions.php file.

    add_filter( 'mctb_bar_config', function( $data ) {
    	$data['cookieLength'] = 1;
    	return $data;
    } );

    This sets the cookie expiry date to just 1 day, which means the bar will be open again the next. 🙂

    Hope that helps. If not, let me know!

    Thread Starter pf62

    (@pf62)

    bloody awesome! Thank you! 🙂

    Plugin Author Danny van Kooten

    (@dvankooten)

    Glad that helps! Should you have a quick minute to spare, a plugin review here on ww.wp.xz.cn would make me quite happy. 🙂

    Thread Starter pf62

    (@pf62)

    Could this be reduced further, to perhaps bring it down to say 12 hours?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Hide / Unhide feature’ is closed to new replies.