To conditionally show a tag on a blog image based on a CMS field (e.g., "Relationship Status"), you’ll need to use CMS conditional visibility settings within the Webflow Designer.
1. Add and Structure Your CMS Fields
- In your Blog Posts Collection, ensure you have a multi-reference field or option field named something like Relationship Status.
- Include options like "Single," "In a Relationship," "All Statuses", etc., depending on how granular you want it.
2. Design the Tag Wrapper in the Blog Template
- Go to your Blog Post template page and select the image wrapper or wherever you want the relationship status tag to appear.
- Add a Text Block or Div inside or over the image to act as the tag badge.
- Bind the text dynamically to the Relationship Status field (if it’s an option field) or use a Collection List if it's a multi-reference field.
3. Set Conditional Visibility
- Select the tag element.
- Go to the Element Settings Panel (gear icon).
- Under Conditional Visibility, click + Add Condition.
- Set the condition based on the logic:
- If using an option field: Set visibility to only show when Relationship Status is not equal to "All Statuses".
- If using a multi-reference field: Use a Collection List Wrapper for the statuses, and filter it to exclude items where Name = "All Statuses".
4. Customize Display As Needed
- Style the tag's visibility and text to display values like “For Single,” “For Couples,” etc.
- Optionally add fallback text or hide the element entirely when "All Statuses" is selected.
Summary
Use conditional visibility in the Webflow CMS template page to show a relationship status tag only when the article’s “Relationship Status” field does not equal "All Statuses.” This ensures the tag appears only for targeted content and stays hidden for general posts.