# 複数の特定ページのヘッダーを非表示にしたい

**URL:** <https://community.shopify.com/t/topic/169926>\
**Category:** 技術的なQ＆A\
**Created:** [November 22, 2022, 8:49am UTC](https://community.shopify.com/t/topic/169926 "2022-11-22T08:49:06Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Qcoltd](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/qcoltd/32/900_2.png) [@Qcoltd](https://community.shopify.com/u/Qcoltd)\
**Post date:** [November 30, 2022, 10:49am UTC](https://community.shopify.com/t/topic/169926/5 "2022-11-30T10:49:21Z")

</div>

ヘッダーを表示しないページと、フッターを表示しないページは、同じページということでよろしかったでしょうか？

もしそうでしたら、

```markup
{% section 'footer' %}

```

を、

```markup
{%- if hasHeader -%}
{% section 'footer' %}
{%- endif -%}

```

にすることで、

ご希望かなうと思うのですが、

上手くいかなったでしょうか？

もし、

ヘッダーを非表示にしたいページと、

フッターを非表示にしたいページが異なる場合は、

下記のうようにされてはいかがでしょうか？

```markup
{%- assign hasFooter = true -%}
{%- if template.suffix contains "landingpage" -%}
  {%- assign hasFooter = false -%}
{%- endif -%}
{%- if template.name == 'product' -%}
  {%- if product.id == 対象の商品ID or product.id == 対象の商品ID or product.id == 対象の商品ID -%}
    {%- assign hasFooter = false -%}
  {%- endif -%}  
{%- endif -%}

{%- if hasFooter -%}
{% section 'footer' %}
{%- endif -%}

```

ご参考まで。

(キュー田辺)

---

_[View the full topic](https://community.shopify.com/t/topic/169926)._
