Block Visibility lets you control whether a block appears on the front end of your site — and, as of WordPress 7.0, at which screen sizes.

Hiding a block from the front end

Introduced in WordPress 6.9, you can prevent any block from rendering on the front end without deleting it. The block stays in the editor and can be re-enabled at any time.

To hide a block:

  1. Select the block in the editor.
  2. In the block toolbar, select the ... menu, then click ‘Hide’.
  3. To re-show a block, you can find it in the List view.

Hiding a block at specific breakpoints

WordPress 7.0 adds per-breakpoint control, so you can show or hide a block depending on screen size. Options include Mobile, Tablet, and Desktop — and they can be combined. For example, you could hide a block on mobile while keeping it visible on tablet and desktop.

To set breakpoint visibility, select the block, open the Block tab in Settings, and expand Visibility. Toggle each breakpoint on or off as needed.

Things to keep in mind

In general we recommend using block visibility sparingly, and watch out for these gotchas:

Breakpoint visibility should not be used on ads

Ad providers like Google Ad Manager expect consistent ad impressions. Hiding ads via CSS can violate their policies and result in penalties. Because of this, the Newspack Ads plugin removes the ‘Hide’ option from Ad blocks. If you need responsive ad behavior, configure it in your ad provider’s settings instead.

Hidden at a breakpoint doesn’t mean removed

Breakpoint visibility hides blocks using CSS — the HTML is still on the page. That means hidden blocks still load and can affect performance, and their content can be viewed by viewing the webpage’s source. Use these settings selectively; hiding different content at different breakpoints can quickly make pages harder to maintain.

Content Loop deduplication applies to hidden blocks, too

If you’re using a Content Loop block, the deduplication system counts posts that appear inside hidden blocks. A post in a block hidden on mobile will still be marked as “seen” and may be excluded from other loops on the same page that are visible on mobile. If you’re using separate loops for different breakpoints, check that deduplication isn’t producing unexpected results.