Skip to content

Terms Query Block: Max terms does not work on pages for non-hierarchical taxonomies #74144

@jillro

Description

@jillro

Description

In Terms Query Block, Max terms does not work on pages for non-hierarchical taxonomies : all terms are always displayed.

Step-by-step reproduction instructions

  • Start a new playground instance https://playground.wordpress.net/#{}
  • In the admin, quick edit Hello world post and add 3 tags
  • Pages > Add page > Add block -> Terms Query -> Name variation
  • In the block panel set :
    • Taxonomy = Tags
    • Max terms = 2
  • Publish the page
  • Visit the new page

Results

The editor displays 2 tags, but the page displays 3.

#74130 fix the problem.

Screenshots, screen recording, code snippet

Image Image

Environment info

  • Wordpress 6.9 and trunk

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Terms QueryAffects the Terms Query Block[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions