Liquid、JavaScriptなどに関する質問
Tasteのテーマを使用しています。
https://community.shopify.com/c/%E6%8A%80%E8%A1%93%E7%9A%84%E3%81%AAq-a/bd-p/tqa-jp
上記 Q&Aを参考にfooter.liquidにある以下をコピーしてheader.liquid内に貼り付けましたが反映されませんでした。
※また、「if settings.brand_image」〜「-%}」直上の「endif」までを削除して貼り付けてもみましたが同様に反映されませんでした。
そもそも貼り付けているソースが的違いなのか、その他原因および反映させる方法がわかると幸いです。
{%- liquid assign has_social_icons = true if settings.social_facebook_link == blank and settings.social_instagram_link == blank and settings.social_youtube_link == blank and settings.social_tiktok_link == blank and settings.social_twitter_link == blank and settings.social_pinterest_link == blank and settings.social_snapchat_link == blank and settings.social_tumblr_link == blank and settings.social_vimeo_link == blank assign has_social_icons = false endif if settings.brand_image == blank and settings.brand_headline == blank and settings.brand_description == blank assign brand_empty = true endif if section.blocks.size == 1 and section.blocks[0].type == 'brand_information' and brand_empty and has_social_icons == false and section.settings.newsletter_enable == false and section.settings.enable_follow_on_shop == false assign only_empty_brand = true endif -%}
解決済! ベストソリューションを見る。
成功
SNSアイコンを表示するコードは以下になります。
{%- render 'social-icons' -%}
表示・非表示の切り替えやレイアウトの調整は、別途コードを記述する必要があります。
デフォルトの機能で、告知バーにSNSアイコンを表示することができるので、そちらを使う方法もありますね(デスクトップのみですが)。
成功
SNSアイコンを表示するコードは以下になります。
{%- render 'social-icons' -%}
表示・非表示の切り替えやレイアウトの調整は、別途コードを記述する必要があります。
デフォルトの機能で、告知バーにSNSアイコンを表示することができるので、そちらを使う方法もありますね(デスクトップのみですが)。
ありがとうございます!無事に解決しました!
いつもShopifyをご利用いただき、ありがとうございます。 Shopifyは、皆様の日本語での利用体験の向上に努めております。さらなる改善のために皆様のご意見をお寄せい...
By JasonH May 9, 2025Shopify アカデミーの学習パスと認定スキルバッジExpanding Your Shopify Business Internationallyを活用して、国際的にビジネ...
By Shopify Feb 7, 2025Shopify アカデミーの学習パスB2B on Shopify:立ち上げとカスタマイズで卸売販売に進出しましょう。これら3つの無料コースは、ShopifyストアでB2B機能...
By Shopify Jan 31, 2025