Add Built-In Way to Join Array Items with a Separator

In WordPress, it's very common to display a list of taxonomy terms (like categories or tags) for a post, formatted like:

Categories: Design, UI, Inspiration

Each term is optionally linked to its archive page, and the list is comma-separated.

In Clutch, if you're querying WordPress terms via a wp:post.categories or wp:post.tags field and looping through them in a repeater or component, you currently get a list of nodes, but you can't easily insert commas between them, because:

  • You can't conditionally render a comma unless you know it’s not the last item

  • There’s no built-in helper (like join(", ") for rendering JSX or string templates)

  • Users are resorting to CSS tricks like adding a comma via ::after on every .term except the last one

This works visually, but it’s a hack — it doesn’t help screen readers, and it makes linking the terms more complicated.


How to Reproduce in Clutch

  1. Create a WordPress post with multiple categories or tags.

  2. Use the Clutch WordPress integration to fetch the terms (e.g. wp:post.categories).

  3. render them using loop > text bind

  4. Notice: There’s no comma between them, and no way to insert one except using CSS pseudo-selectors or hacking around it.


🐞 Feature Request / Bug Report

Title: No Easy Way to Render Comma-Separated Term Names (Linked or Unlinked)

Issue:
There’s currently no built-in or clean way in Clutch to render a list of taxonomy terms (e.g., categories or tags) as a comma-separated list — especially when the terms are linked.

This is a very common pattern in WordPress theming (e.g. “Design, UI, Inspiration”), but Clutch users have to resort to fragile CSS pseudo-selectors (:not(:last-child)::after) or hand-written conditional logic.


Steps to Reproduce

  1. Query WordPress terms (e.g., wp:post.categories) in a post card

  2. Map them into a component like TextLink

  3. Try to insert commas between them

  4. Discover there is no built-in helper or join-style control


⚠️ Impact

  • Breaks a very common WP pattern

  • Poor accessibility with CSS-only workarounds

  • Leads to inconsistent styling or hard-to-maintain markup


Please authenticate to join the conversation.

Upvoters
Status

Under Review

Board

Feature

Tags

Low Priority

Date

10 months ago

Author

Sridhar Katakam

Subscribe to post

Get notified by email when there are changes.