Update Terms Query block to inherit from post context#72306
Draft
cr0ybot wants to merge 10 commits into
Draft
Conversation
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Related to #71911
We currently support inheriting the parent term from a taxonomy archive context, but there is no mechanism in place for inheriting from a post.
Why?
We have blocks that display a post's terms as comma-separated lists or button-like links (but not actually buttons), but the in-editor layout and design tools are very limited and users must rely on block styles provided by the theme.
If we still had term data block bindings and full layout controls in place, this would enable a wide variety of customizations for how terms are displayed in single post templates.
How?
This PR extends the meaning of
inherit = trueto inherit the terms of a post in context by checking ifpostIdis set or if editing asingletemplate.Testing Instructions
You must enable "Experimental blocks" in the Gutenberg plugin settings!
Post inheritance from a single post:
Post inheritance within a Query Loop:
Post inheritance in a single template:
Screenshots or screencast
To do
Issues
Inheritance from the current post works, but the post must have been previously saved with the terms for them to show up—they do not dynamically change when updating the terms on the post.