Ecommerce Shopify WordPress Discussion

Shopify – using custom meta fields from the Search & Discovery App in liquid code

I'm using the Dawn theme and I'm styling the facets within facets.liquid and component-facets.css. I want to use a grid view for one of my filter types however when I change the visual_layout_class from 'facets-layout-list' to 'facets-layout-grid' it changes all the facets into a layout grid view. I've tried all sorts to use the custom meta field.. any ideas where I'm going wrong, this is the code: {% liquid assign total_active_values = total_active_values | plus: filter.active_values.size case filter.presentation when 'swatch' assign has_visual_display = true assign show_more_number = 15 **if filter.metafield == 'meta_field_name'** assign visual_layout_class = 'facets-layout-grid facets-layout-grid--' | append: filter.presentation else assign visual_layout_class = 'facets-layout-grid' endif else assign has_visual_display = false assign visual_layout_class = 'facets-layout-list' assign show_more_number = 10 endcase %} The code I need help with is if filter.metafield == 'meta_field_name'
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.