Title: Exclude block from cache
Last modified: January 23, 2023

---

# Exclude block from cache

 *  Resolved [naturfreundeschweiz](https://wordpress.org/support/users/naturfreundeschweiz/)
 * (@naturfreundeschweiz)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/exclude-block-from-cache-2/)
 * We have a custom block that sometimes has problems with the cache option from
   wpo. It should show three posts depending on the settings but sometime only one
   shows up. After clearing the cache it works again.
 * Is there a way to exclude a block type from caching? Or do you have an idea what
   the problem could be? The site in question is [https://naturfreunde.ch](https://naturfreunde.ch)(
   german). The posts not showing up are below “Aktuelles” and “Artikel aus der 
   Zeitschrift Naturfreund”.

Viewing 1 replies (of 1 total)

 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/exclude-block-from-cache-2/#post-16400914)
 * You can’t exclude a block but in cache>>advanced settings>>**Conditional tags
   to exclude from caching** you can set conditions for excluding a page from caching.
 * depending on how your site is set up you can try adding is_home() or is_front_page(_)
 * [is_home()](https://codex.wordpress.org/Function_Reference/is_home) When the 
   main blog page is being displayed. This is the page which shows the time based
   blog content of your site, so if you’ve set a static Page for the Front Page (
   see below), then this will only be true on the Page which you set as the “Posts
   page” in [Administration](https://codex.wordpress.org/Administration_Panels) 
   > [Settings](https://codex.wordpress.org/Administration_Panels#Reading) > [Reading](https://codex.wordpress.org/Settings_Reading_SubPanel).
 * [is_front_page()](https://codex.wordpress.org/Function_Reference/is_front_page)
   When the front of the site is displayed, whether it is posts or a [Page](https://codex.wordpress.org/Pages).
   Returns true when the main blog page is being displayed and the ‘[Settings](https://codex.wordpress.org/Administration_Panels#Reading)
   > [Reading](https://codex.wordpress.org/Settings_Reading_SubPanel) ->Front page
   displays’ is set to “Your latest posts”, **or** when ‘[Settings](https://codex.wordpress.org/Administration_Panels#Reading)
   > [Reading](https://codex.wordpress.org/Settings_Reading_SubPanel) ->Front page
   displays’ is set to “A static page” and the “Front Page” value is the current
   [Page](https://codex.wordpress.org/Pages) being displayed.

Viewing 1 replies (of 1 total)

The topic ‘Exclude block from cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/exclude-block-from-cache-2/#post-16400914)
 * Status: resolved