Query Results Block WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/philhoyt/query-results-block/releases/download/v1.1.0/query-results-block.zipA WordPress plugin that adds a "Results" block for the Query Loop. This block shows its content only when the Query Loop has posts to display - the perfect complement to WordPress's built-in "Query No Results" block.
What It Does
The Results block acts as a container that only appears when your Query Loop finds posts. Think of it as the opposite of the "Query No Results" block that WordPress includes by default.
Installation
- Download and upload the plugin files to
/wp-content/plugins/query-results-block/ - Activate the plugin through the 'Plugins' screen in WordPress
- The "Results" block will now be available inside Query Loop blocks
How to Use
- Add a Query Loop block to your post, page, or template
- Inside the Query Loop, look for the "Results" block in the block inserter
- Add the Results block and place any content inside it that you want to show only when posts are found
- Add your conditional content - headings, text, buttons, or any other blocks
The Results block content will automatically show or hide based on whether the Query Loop has posts.
Example Usage
Query Loop Block
├── Results Block
│ ├── Heading: "Latest Posts"
│ └── Paragraph: "Check out our most recent articles"
├── Post Template (your post layout)
└── Query No Results Block
└── Paragraph: "No posts found"
This way, visitors only see the "Latest Posts" heading when there are actually posts to show.
Changelog
1.1.0
- Add: Automatic updates delivered through GitHub releases — update notifications now appear in the WordPress dashboard.
- Fix: Internal code cleanup and WordPress coding-standards compliance.
1.0.0
- Initial release: adds the Results block for the Query Loop, which shows its inner content only when the query returns posts.
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.