Skip to main content

1.29.1 - The primary term option works on WordPress 6.7

· 3 min read
Konstantin Brazhnik
Senior Full Stack Engineer @ Yoko Co

The Primary Term option that 1.29.0 added to the terms block did nothing at all on WordPress 6.7. A block set to render only the primary term rendered every term, with nothing to indicate the setting was being ignored. Sites on 6.8 were unaffected, which is why this went unnoticed. The option is also now two toggles rather than a dropdown, matching the rest of the panel it sits in.

  • [FIX] The Primary Term option on the core/post-terms block now applies on WordPress 6.7. The option rearranges the term list for the length of one block render, and 6.7 asks for that list twice — once to decide whether the block has anything to render, then again to build the markup — so the rearranged list was spent on the check and the page was built from the untouched one. WordPress 6.8 asks once, which is why the same setting worked there. See Primary Term.
  • [IMPROVEMENT] The option is now two toggles — Show Only the Primary Term and Show the Primary Term First — where it was a dropdown. Every other option on that block is a toggle, and this one decides which terms render at all, so it was the odd one out. Existing blocks keep their setting untouched: the toggles read and write exactly what the dropdown wrote, and nothing needs re-saving.
What changes on the page after updating

On a site running WordPress 6.7, any block using this option starts doing what it was set to do — so a block set to primary term only goes from listing every term to listing one. That is the fix working, but it is a visible change to pages that have been rendering the wrong thing. Sites on 6.8 or later see no difference.

The two toggles

Switching one on switches the other off — a block cannot render only the primary term and also lead with it — and Show the Primary Term First is greyed out while Show Only the Primary Term is on, because there is nothing left for it to lead. A post with no primary term is unaffected either way: it renders every term, rather than rendering nothing.

For the team

Nothing below reaches a client site — none of it is in the release zip — but it changes how this repo is reviewed and tested:

  • Every pull request now gets a WordPress Playground link that opens a demo site of the whole plugin: a home page listing every feature with somewhere to click for each, demo pages for the blocks and shortcodes, post types generated from a yoko.yml, and a post behind each of the two content gates. It used to be one page with one Card Flip block on it. Adding a feature to it is one entry in scripts/playground/catalog.mjs, and npm run playground boots the same blueprint locally. See Playground Demo Site.
  • A user-visible change is now expected to update that demo on the same terms as the documentation — AGENTS.md says so, and the PR template asks for it.
  • Cloud sessions get told at startup which hosts are missing from the environment's egress allowlist, instead of finding out through a Docker build that dies at apt-get.