Documentation

Query No Results Block

The Query No Results block displays content when a Query Loop block finds no posts matching the query criteria. This provides a better user experience than showing an empty space.

Adding a Query No Results Block

  1. Add aย Query Loop blockย first
  2. Inside the Query Loop block, click theย “+”ย button
  3. Search forย “Query No Results”ย or find it in theย “Theme”ย category
  4. Click to insert the block

Note: This block only works within Query Loop blocks and only displays when no posts match the query.

Adding Content

Add any blocks inside the Query No Results block to create your “no results” message:

  • Paragraph: Add explanatory text
  • Heading: Add a heading like “No Posts Found”
  • Button: Add a call-to-action button
  • Other Blocks: Add any other blocks for your message

Example Content

A typical “no results” message might include:

  1. Heading: “No Posts Found” or “Nothing to Display”
  2. Paragraph: Explanation or alternative content
  3. Button: Link to browse all posts or other content

Styling Options

Style the Query No Results block like any other block:

  • Colors: Text color, background color
  • Typography: Font size, font family, font weight, etc.
  • Spacing: Padding
  • Borders: Border radius, border color, etc.

Best Practices

  1. Helpful Message: Provide a clear, helpful message
  2. Alternative Content: Offer alternative content or links
  3. Professional Appearance: Style the message to match your email design
  4. Test Scenarios: Test with queries that return no results

Troubleshooting

Block Not Displaying

  • The block only shows when no posts match the query
  • Verify your query actually returns no results
  • Check that the block is inside a Query Loop block

Always Showing

  • Check your query settings – they may be too restrictive
  • Verify posts exist that match your query criteria
  • Review query filters and parameters

Additional resources

Use the links below for more information and guidance on adding blocks. Keep in mind that these articles are general information related to the WordPress Editor and building with blocks. Email Customizer does not utilize all blocks or functionality due to the limited capabilities of emails.

WordPress Editor