Title: Cookie condition not working
Last modified: June 18, 2025

---

# Cookie condition not working

 *  [tsvetko.krastev](https://wordpress.org/support/users/tsvetkokrastev/)
 * (@tsvetkokrastev)
 * [9 months, 4 weeks ago](https://wordpress.org/support/topic/cookie-condition-not-working/)
 * Hey, I’m trying to hide/show specific groups based on a cookie, but it’s not 
   working. I’m using a FSE block theme and in my Header template part I have 2 
   different “headers”. When opening the site it sets a cookie with value “value1”
   and should display “header-1”. When going to a specific url, the cookie is updated
   to “value2” and should display “header-2”.. I have set my rules as follow – “
   cookie name value is equal to”. The problem is that upon opening the site, the
   cookie is set to “value1”, but I’m seeing both headers.. When I refresh the page
   the correct header is displayed and the other is hidden..

Viewing 1 replies (of 1 total)

 *  [billfinn](https://wordpress.org/support/users/billfinn/)
 * (@billfinn)
 * [8 months, 1 week ago](https://wordpress.org/support/topic/cookie-condition-not-working/#post-18588373)
 * I am running into a similar issue. I have cookie that will change to “true” if
   a page is visited, which will then have some blocks display and some blocks hide
   using the plugin. Although the cookie is working, the blocks are not reacting
   to the cookie. Any help or support would be greatly appreciated.

Viewing 1 replies (of 1 total)

The topic ‘Cookie condition not working’ is closed to new replies.

 * ![](https://ps.w.org/block-visibility/assets/icon-256x256.png?rev=3122657)
 * [Block Visibility — Conditional Visibility Control for the Block Editor](https://wordpress.org/plugins/block-visibility/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/block-visibility/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/block-visibility/)
 * [Active Topics](https://wordpress.org/support/plugin/block-visibility/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/block-visibility/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/block-visibility/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [billfinn](https://wordpress.org/support/users/billfinn/)
 * Last activity: [8 months, 1 week ago](https://wordpress.org/support/topic/cookie-condition-not-working/#post-18588373)
 * Status: not resolved