Show false value for boolean Metafield in product detail view

Topic summary

Main issue: Boolean product metafields set to false are treated as empty by the theme, so the product detail view shows a placeholder (e.g., “-”) or hides the field. The request is to display “No” for false and still hide truly empty fields.

Proposed solution: Edit the product template (Liquid) to check the metafield’s key and value. Output “Yes” when true, “No” when false, and hide when empty. Liquid is Shopify’s templating language; metafields are custom fields on products.

Follow-up concern: The store has 200+ metafields, so key-by-key checks are impractical. The requester asks if the logic can target the field type (boolean) broadly instead of individual keys.

Additional constraint: The requester notes a maximum of 25 filters and asks for a way to exceed that limit. In Shopify, filters typically refer to storefront product filtering; the post seeks a workaround.

Status: No confirmed resolution. Action items pending: guidance on type-based Liquid handling for boolean metafields at scale, and clarification or workaround for the 25-filter limit. Discussion remains open.

Summarized with AI on December 28. AI used: gpt-5.

Hi,

i have several products with boolean values, which i want to display below the products in a value list.
My theme allows me to input metafields to display. If the metafield value is empty it will either not show or i can select to show empty values with a custom text, f.e. " - ".

My issue is that this also applies to boolean false values, showing " - " instead of “No” or simply not showing the entire field, if i select to not show empty fields. ( this is my prefered setting, since there are a lot of fields)

How can i change settings/liquid code so boolean false values will be shown as “No”?

Thank you and best regards

TimoH

Hi @TimoH ,
This is Theodore from PageFly - Shopify Page Builder App.

To show “No” for boolean “false” and hide empty metafields in Shopify:

  1. Edit theme code (e.g., product.liquid).
  2. Find metafield output code (loops or filters).
  3. Add Liquid code to check the metafield key and value:
    • If key matches your boolean field and value is “true”, show “Yes”.
    • If key matches and value is “false”, show “No”.
    • If key matches and value is empty (optional): hide the field with ``.
  4. Save and test on a non-live version of your store.

Best regards,
Theodore | PageFly

Hi Theodore,

thank you for your reply - is there a solution for addressing the field type? i am talking about 200+ metafields here.

Also, i just noticed that i can only create a max of 25 filters, id like to create way more tho. Is there a way to work around that max?

Best regards

TimoH