Query Loop: tag filtering limited to 100 tags
Description
First reported in Core Trac ticket 53704.
When there are more than 100 tags (in the above report there are 300 tags), only 100 tags are available for filtering the Query Loop.
Step-by-step reproduction instructions
- Using wp-cli create at least 200 tags (these will be created as Tag 1 to Tag NNN)
- Create a post
- Add a Query Loop block and select the first template
- Go to the
Tagsfield in the block'sFilters - Type
Tag 100=> Notice it does appears and is selectable as the filter - Type
Tag 200=> Notice it does not appear and is not selectable as the filter
Expected behaviour
The tag field's auto complete should fetch the next group of tags that match what has been typed into the field. In other words, it should display these tags and allow them to be selectable.
Actual behaviour
Tags named as Tag 1 to Tag 302.
- When typing Tag 1, the field displayed Tags 1 to Tags 189. It did not display Tag 190+.
- When typing Tag 2, nothing showed in the field and pressing enter for manually input it did not work (reset the field to empty).
- When typing Tag 302, nothing showed in the field and pressing enter for manually input it did not work (reset the field to empty).
Note: No errors in browser console.
Screenshots or screen recording (optional)

and video provided by reporter https://youtu.be/lKlYlMZ6Mx0
WordPress information
- WordPress version: 5.8
- Gutenberg version: NA
- Are all plugins except Gutenberg deactivated? Yes AND Gutenberg plugin is also deactivated
- Are you using a default theme (e.g. Twenty Twenty-One)? Yes
Device information
- Device: Desktop
- Operating system: macOS Big Sur v 11.4
- Browser: Chrome v 91.0.4472.114
Any update on this?
Will this be fixed before block themes are released in January? I have been trying to use the Query Loop block to update pages; I wanted to remove some custom solutions and use the built-in Gutenberg tools, but I immediately ran into this problem. Filtering a query by a tag seems like a common scenario, and right now it does not work on a medium-sized site.
I had to manually add the tag ID using the code view of the editor. I'm also waiting for this fix.
Will this be fixed before block themes are released in January? I have been trying to use the Query Loop block to update pages; I wanted to remove some custom solutions and use the built-in Gutenberg tools, but I immediately ran into this problem. Filtering a query by a tag seems like a common scenario, and right now it does not work on a medium-sized site.
We are currently in a similar scenario. Is there any new development as concerns this issue?
For clarity, we have 3,527 tags, so the 100 tag limit is far from ideal.
For anyone needing a workaround, here is how to manually add the tag ID, as @JosVelasco mentioned:
- get the desired tag ID by visiting the Tags page and hovering over the tag (the ID will be in the URL after
tag_ID=) - click the vertical ellipsis in the upper right hand corner of the edit screen
- click "code editor"
- look for the query and add the tag ID to the
tagIdsarray


Why is it so hard to solve this problem? It is a painfull process to clarify the situation to my customer and educate them to code - they do not want to code, that's why they use WordPress...
Wondering if there is a solution to this problem as well. Mad props to @JosVelasco for the workaround. If there is no one working on resolving this right now, can you clarify if you are open to pull requests to dix the problem?
I'm experiencing this issue too.
I initially thought it has something to do with my theme or plugin, but my developer informed me that the issue was on WordPress and that I should contact WordPress support. Fortunately, it's a general issue. Surprisingly, it's still not fixed after being identified in 2021.
Hopefully, the issue gets fixed in the near future as the Post List block is a very useful feature I use on my projects and clients' projects. I had been using Category and Keyword filters as a workaround, but that approach is not sufficient.
Big shout out to @JosVelasco and @brylie for a better workaround!
This task is open for more than 12 months? I am glad I found this issue. I thought it was a bug with my content.
Gotta add a "ditto"on this one. Stumbled across this bug the hard way after spending hours removing another plugin that helped me generate lists of posts that have a tag. Now I'm stuck, unable to go froward while not thrilled about going back to the old way.
I also came across this error. I want to fix it. I've started to create a Pull Request and I see that the 100 tag list is fetched when rendering the component. When typing the tag name, nothing new is fetched, it is all the time filtering the previously fetched list of tags. https://github.com/WordPress/gutenberg/blob/b856a3fc6b72b3c48f35608c68b83d0953959f47/packages/block-library/src/query/edit/inspector-controls/taxonomy-controls.js#L38-L50 https://github.com/WordPress/gutenberg/blob/b856a3fc6b72b3c48f35608c68b83d0953959f47/packages/block-library/src/query/edit/inspector-controls/taxonomy-controls.js#L84-L121
I see that there is a FlatTermSelector component in Gutenberg. I think it is worth using it instead of re-creating the same functionality in several places. It would be nice if this component was available for reuse.
https://github.com/WordPress/gutenberg/blob/b856a3fc6b72b3c48f35608c68b83d0953959f47/packages/editor/src/components/post-taxonomies/flat-term-selector.js
Currently, it cannot be used.
Hey 👋 - I'd appreciate some testing in this PR that aims to resolve this issue. Thanks!