# 並び替えフィルターのモバイル表示

**URL:** <https://community.shopify.com/t/topic/397636>\
**Category:** 技術的なQ＆A\
**Created:** [February 28, 2025, 7:00am UTC](https://community.shopify.com/t/topic/397636 "2025-02-28T07:00:37Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

ユーザーがShopifyのコレクションページで並び替えオプション（おすすめ、ベストセラー、アルファベット順など）を削除しようとした際、CSSによる方法ではPCのみに反映され、モバイルでは全て表示されたままという問題が発生。

**解決方法:**
回答者がLiquidファイルの編集による方法を提案。具体的には以下のファイルを編集:
- `main-collection-product-grid.liquid`
- `facets.liquid`

提供されたコードスニペット:
```
{% for option in collection.sort_options %}
  {% unless option.value == 'manual' or option.value == 'best-selling' or option.value == 'title-ascending' or option.value == 'title-descending' %}
  {% endunless %}
{% endfor %}
```

**結果:**
最初は一カ所の編集漏れがあったが、２つ目のコード編集箇所を追加することで、PC・モバイル両方で希望通りの並び替えオプションのみ表示されるようになり、問題は解決した。

<div class="post-metadata">

**Author:** ![curry313](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@curry313](https://community.shopify.com/u/curry313)\
**Post date:** [February 28, 2025, 7:00am UTC](https://community.shopify.com/t/topic/397636/1 "2025-02-28T07:00:37Z")

</div>

先日回答いただきました

コレクションページに存在する並び替えのうち

・オススメ

・ベストセラー

・アルファベット順

を削除する方法として、下記のようなカスタムCSS

[value=“title-descending”] { display: none; }

を追加することで削除出来ることを教えていただきました。

無事に成功して、任意の並び替えを削除出来たのですが、

PCのみで反映されており、モバイルでは全て表示されているままでした。

モバイルでも非表示を反映させる方法はございますでしょうか？

---

<div class="post-metadata">

**Author:** ![Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/anonymous_44fbe07fc59d9ccaacd70575fd5a5155/32/194200_2.png) [@Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://community.shopify.com/u/Anonymous_44fbe07fc59d9ccaacd70575fd5a5155)\
**Post date:** [February 28, 2025, 9:45am UTC](https://community.shopify.com/t/topic/397636/2 "2025-02-28T09:45:04Z")

</div>

質問拝見しました。

こちらに関してsp版、pc版ともに表示非表示を制限する方法がございますのでそちらでやっていただければと思います！

下記記事を見ながらファイルを編集していただければ簡単に非表示にできますので、参考にしていただけますと幸いです。

[https://tsun.ec/blogs/tech/shopify-tips-hide-sort-options](https://tsun.ec/blogs/tech/shopify-tips-hide-sort-options)

下記のコードを参考にしていただけますと幸いです。

```markup
{% for option in collection.sort_options %}
  {% unless option.value == 'manual' or option.value == 'best-selling' or option.value == 'title-ascending' or option.value == 'title-descending' %}
    
  {% endunless %}
{% endfor %}

```

なにかご質問があれば、お気軽にご相談ください。  
お悩み解決できましたら、ベストアンサー、いいねいただけると励みになります。  
何卒よろしくお願いします。

株式会社フルバランス

---

<div class="post-metadata">

**Author:** ![curry313](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@curry313](https://community.shopify.com/u/curry313)\
**Post date:** [March 6, 2025, 7:51am UTC](https://community.shopify.com/t/topic/397636/3 "2025-03-06T07:51:28Z")

</div>

いただいたリンク先ページを元に

「main-collection-product-grid.liquid」

「facets.liquid」

の該当箇所を

記載のコードに置き換えました。

しかし、引き続き

実際のPCと、Shopifyカスタマイズ上のデモ画面（PC・モバイル両方）

では希望通り４つの並び替え項目のみ表示

実際のモバイル環境では

８つのデフォルトの並び替え項目が全て表示されたままでした。。

原因考えられますでしょうか？

---

<div class="post-metadata">

**Author:** ![curry313](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@curry313](https://community.shopify.com/u/curry313)\
**Post date:** [March 9, 2025, 11:44am UTC](https://community.shopify.com/t/topic/397636/4 "2025-03-09T11:44:13Z")

</div>

２つ目のコード編集箇所が一カ所漏れていました  
いただいたリンクの記事で無事にモバイルも反映されました！ありがとうございます！
