There is a No Results block that can be added to the query loop block. Any inner blocks added to it will be displayed when there are no results. Most blocks are supported as inner blocks.
Here’s the markup of an example where I added a group block containing a paragraph block:
<!-- wp:query-no-results -->
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:paragraph -->
<p>No results found.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
<!-- /wp:query-no-results -->
Related Posts:
- WordPress Full Site Editing: How can I access my posts listing page?
- block theme FSE – save changes to the theme?
- How to set the background color of a template part (Header/Footer) in Twenty Twentythree?
- How to move the customizations done in the Editor to my child theme?
- Block Theme Template parts – Why saving a part updates the other ones?
- Get postId in a wordpress pattern file?
- How can I disable fontSizes of the Paragraph block inside the Quote block with theme.json?
- In Full Site Editing, how do I get the templates I created to appear in the site editor when populating a new page?
- Custom Link Block with own background color
- Default RichText Editor custom block fails validation
- Position tab missing in the Block Theme Editor
- Set a default overlay color for the Core Cover block in theme.json
- Extending the Query Loop block
- Query Loop block display multiple post types
- Add pre-publish conditions to the block editor
- How does Gutenberg handle translations in React?
- How can I access core/paragraph textColor in a block template
- Saving post meta using the new EntityProvider APIs
- Implement Panel Color Inspector Control in Gutenberg
- gutenberg dynamic block is returning 404
- Gutenberg InspectorControls is deprecated, how to add custom block settings?
- How should you internationalize javascript spread in multiple files but build in one?
- Why is onChange={ ( content ) => setAttributes( { content } )} now used?
- How to set column widths in a CPT block template?
- Access GutenBerg data with Javascript?
- Only show focused toolbar for Gutenberg Block with Multiple text fields
- Gutenberg: How to Change Post Status Programmatically?
- Adding a custom PanelColorSettings control to a core block, and using the color slug in a custom className
- Enhancing Gutenberg featured image control
- Is it possible to create column width presets in Gutenberg?
- How to define a Block Style in an Innerblocks template
- Option for removing block not appearing in custom gutenberg block
- Testing custom themes / plugins under Gutenberg
- Gutenberg LinkControl suggestionsQuery not working
- Gutenberg – How to prevent block from being deleted and reordered/moved
- WordPress Gutenberg Columns block
- Gutenberg InnerBlocks predefined block supports
- Is it possible to bulk migrate all deprecated instances of a gutenberg block?
- How to Add a Container Class to Standard Gutenberg Blocks
- How to display InnerBlocks in render callback
- How to check if post has Video or Gallery block in Gutenberg blocks?
- Gutenberg – button to parse and format all blocks?
- Custom WP Block using Inner Blocks crashes editor, doesn’t save content
- Gutenberg Button Border Radius Default
- Disable title block on edit screen for a custom post type
- Gutenberg: Block validation fails if editor is reloaded or post is edited. data.getBlocks(); is empty in save function
- Delete a Gutenberg Block Programmatically?
- Can Gutenberg be used as an editor on a page?
- Import external data into post using custom Gutenberg block
- How do a I add an attribute to element (when using block theme)?
- How to transform block variant to default version?
- How can I add a color picker to a custom Gutenberg block which includes the default system palette from theme.json?
- How to makes Custom Post Type posts as Gutenberg’s patterns?
- Can’t run WP e2e-test-utils because the browser exits on login?
- Modify the InnerBlocks ‘Add block’ block appender label
- Do I need wp-tinymce-js?
- wp_schedule_single_event issue with save_post hook in gutenberg
- Gutenberg TextareaControl escapes html
- Block editor fails to update HTML section when the word “from” is in source code
- Gutenberg extending the existing class
- Creating Block templates with ‘core/heading’ other than level 2
- how to trigger a Gutenberg image gallery lightbox
- Remove or rename “Default” from Gutenberg typography settings
- How to put and components inside in Gutenberg block
- Wp-script package stop to work
- CheckboxControl does not visible change
- How to import Reusable Blocks programatically?
- Remove formatting in rich text with Gutenbergs Block editor
- Setting font sizes in theme.json
- Is it possible to disable font sizes on sub blocks only?
- Get selected block every time a new block is selected in Gutenberg
- How do I include and iframe in a Custom Block?
- Gutenberg InnerBlocks with ACF Blocks – How to enable multiple buttons?
- How to work with multilingual sites using the full site editor and block themes?
- Trying to edit a page returns the editor encountered an unexpected error
- Block patterns: Any way to reset the pattern to whatever is in the code?
- Block variation / Variation API scope “transform”
- Is there a function to “blockify” html?
- Custom style css doesn’t work in Gutenberg preview
- Gutenberg get list of all custom image sizes
- How to set a template part area?
- Video Block does not autoplay
- Upgraded to wordpress 5.7 and now I can’t select myself as a post author
- Stop JSON code from injecting into gutenburg classic block
- Extend the “Convert to Blocks” feature to add additional functionality
- Blocks. How to store default settings?
- Gutenberg/WordPress – Limit number of categories
- Block editor not displaying properly
- Can the Gutenberg editor be toggled closed?
- Guenberg Block Not Saving – When additional div added
- How to open WordPress media create/edit Gallery Dialog
- Pages are editable in Gutenberg, but posts are coming up in classic editor
- WordPress custom block compatability with WPML
- Add a button to the Gutenberg editor header
- Component toggle not toggling
- Disabling gutenbeg slow down post saving
- How do I add custom CSS animations for specific Gutenberg blocks?
- How to solve react dom ‘removeChild’ on Node error while google translate extension is on and selecting any core block [closed]
- How to set autoload from “yes” to “no” _transient_wp_core_block_css_files
- I want to horizontally align items in multiple parallel columns under one column block