Solved

Can you conceal the title of a single page in Debut theme on Shopify?

chrislenoski
New Member
4 0 0

Hello,

Can you tell me how to hide the page title on a single page. Theme is Debut.

 

Thanks

 

Accepted Solutions (2)
Ninthony
Shopify Partner
2329 350 1023

This is an accepted solution.

go into your page.liquid and look for {{ page.title }} and use an if or an unless statement with the page's handle to exclude it. For example my default page.liquid for Debut is as follows:

 

<div class="page-width">
  <div class="grid">
    <div class="grid__item medium-up--five-sixths medium-up--push-one-twelfth">
      <div class="section-header text-center">
        <h1>{{ page.title }}</h1>
        <em><p>Posted By: {{ page.author }} at {{ page.published_at | date: "%D" }}</p></em>
      </div>

      <div class="rte">
        {{ page.content }}
      </div>
    </div>
  </div>
</div>

If I wanted to exclude the title on my "Super Secret Title" page, i'd do this:

 

<div class="page-width">
  <div class="grid">
    <div class="grid__item medium-up--five-sixths medium-up--push-one-twelfth">
      <div class="section-header text-center">
        {% unless page.handle == "super-secret-title" %}
          <h1>{{ page.title }}</h1>
        {% endunless %}
        <em><p>Posted By: {{ page.author }} at {{ page.published_at | date: "%D" }}</p></em>
      </div>

      <div class="rte">
        {{ page.content }}
      </div>
    </div>
  </div>
</div>

 

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄

View solution in original post

Nick
Shopify Staff (Retired)
4531 434 1024

This is an accepted solution.

Hey @chrislenoski,

 

Thanks for sharing your URL. I had our themes team take a look and @Ninthony's answer is pretty spot on for what you are looking for here. 

 

Should you for any reason want to hide the page titles for all pages, you can do that also. To do this you would go to the theme.scss.liquid file and add the following code the very bottom: 

 

.template-page h1 {
    display: none;
}

Hope this and @Ninthony's answer helps! 🙂

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 70 (70)