Shopify themes, liquid, logos, and UX
Hello,
Can you tell me how to hide the page title on a single page. Theme is Debut.
Thanks
Solved! Go to the solution
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>
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.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024