WP Manifestindependent plugin directory
manifest / editor / query-has-results

Query Has Results

Contains the block elements used to render content when query results are found.

by HAMWORKS · github.com/hamworks/query-has-results

0stars
2release downloads
0forks

Install

The author publishes release zips, so WP-CLI can install straight from GitHub:

wp plugin install https://github.com/hamworks/query-has-results/releases/download/0.1.3/query-has-results.zip

Declares an update source (https://github.com/hamworks/query-has-results), so updates arrive through the plugin's own updater.

Readme

Query Has Results

A WordPress block that shows content only when query results exist.

Description

Query Has Results is a WordPress block plugin that allows you to wrap content that should only be displayed when a query returns results. This is particularly useful when working with Query Loop blocks to create conditional layouts.

Features

  • Simple wrapper block that shows/hides content based on query results
  • Works with WordPress Query Loop blocks
  • Supports both global queries and custom queries
  • Zero configuration required

Installation

  1. Upload the plugin files to the /wp-content/plugins/query-has-results directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Use the Query Has Results block in the block editor

Usage

  1. Add a Query Loop block to your page/post
  2. Inside the Query Loop, add a Query Has Results block
  3. Place any content you want to show only when results exist inside the Query Has Results block
  4. Content will automatically show/hide based on whether the query returns results

Read the full README on GitHub →

Releases

TagPublishedAssetDownloads
0.1.3 Feb 12, 2025 query-has-results.zip 2
0.1.1 Feb 12, 2025