How can I conceal a page title on the Debut theme?

Howdy, @Ninthony ! I seem to be having the same issue of a blank box remaining after I removed the title from my blog pages. I read your comment about wrapping the liquid code around the HTML, but I’ve got through the code and can’t see what you’re referring to. I’m currently working within article.liquid to remove the title text. The box isn’t massively noticeable, but it would be nice if the margin about the first content image could be the same as the margin to the left and right of the first content image. How would I go about doing this? Here is a blog article example. THANK YOU!!!

https://www.wtb.com/blogs/wtb/fear-and-loneliness-in-morocco

Hi!

I also wanted to hide my titles (contact us/shipping policy/terms of service), but this didn’t work for me-I’m using the debut theme. Is there another way I can try?

I’d also like to remove the “Shipping calculated at checkout.” on my product pages if possible !

Thank you!

How do I hide the ‘Home’ page title on my website? I want to reduce the amount of items on the main menu on my page. My website is www.neemafood.com

Hi @Neemala ,

Do you mean the “Home” menu title as seen in the screenshot below?

If so, you can adjust the title headings in your store admin by going to Online Store > Navigation. You can see the guide Shopify created about this here. Let me know if this is what you mean. If it isn’t can you elaborate and show me what you are referring to please!

Hello,

I had the same problem (I wanted to delete the title of one page)…

But it is not working, the title is still there.

Can anybody help me with that? What did I do wrong?

Your code looks right, there could be other things going on. Perhaps a different page template is being used. Go ahead and type something next to your page title, anything you want to show up to let you know you’re in the right place. For instance I always just type a string of a’s like “aaaa”. Refresh your page and see if that shows up next to your title. If it does, you’ll know you’re in the right place, if it doesnt, you’re in the wrong place. If it does, then go ahead and echo out what your page handle is to make sure the condition you’re trying to compare is correct by placing this in your code:

{{ page.handle }}

Refresh the page and see what shows up, that’s going to be what you need to put in quotes on your condition.

1 Like

Thank you so much Ninthony. That worked out perfectly. It was the wrong
page. handle…

Hi,

I’m having the same problem I cannot remove the heading of a specific page.

Please help!

thanks,

Thank you for this! How would I be able to hide the title on multiple pages?

If you’re going to do it for multiple pages, it might be a better idea to just create an alternate page template that you remove the title from, then apply that template whenever you create the pages. Otherwise you’re going to end up with a long stretch of “or” conditions, because you can keep appending to the unless statement:

{% unless page.handle == 'your-first-page'  or page.handle == 'your-second-page' or page.handle == 'your-third-page' %}
{{ page.title }}
{% endunless %}

And that might get a little tiresome to maintain.

1 Like

This worked! Thanks so much.

@Ninthony Thank you for this!

If I want to do this to multiple pages, what is the best way to approach this?

Example, I have pages called sizing, contact, Mindset, etc. Can they be separated by commas or does each page need a new line of code?

Please help :slightly_smiling_face:

You could make an array of collection handles and loop through them, then if the page handle at any point is equal to any of the page handles in the array, set a variable to true and hide the page based on that condition:

// set variable to false by default
{% assign hide_page_title = false %}

//make a string variable of the handles, separated by a comma and space
{% assign handle_array = "sizing, contact, mindset" %}

//split that string by the comma and the space to create the array
{% assign handle_array = handle_array | split: ', ' %}

//loop through each item of the array and compare it to the page handle and set the variable to true
{% for handle in handle_array %}
  {% if handle == page.handle %}
    {% assign hide_page_title = true %}
  {% endif %}
{% endfor %}

//then wherever your page title comes into play, use a condition around it
{% unless hide_page_title %}
  {{ page.title }}
{% endunless %}
1 Like

Hi Nick,

I am having this exact same problem. CSS worked great in removing the titles but then leaves a large white gap. Am I able to get any advice for this at all?

Cheers

Hi @jarmuir ,

To be perfectly honest, my coding knowledge is very limited and I would not be 100% on this. Hopefully, Ninthony sees this as they would definitely be more equipped than me to helping you. Would you be able to reply and share your URL, what theme you’re using, and if possible a screenshot of the exact area you’re referring to? It would be a great help in troubleshooting this further for everyone.

Hi Nick,

No problems, thanks for the help. Im using debut theme.

URL is www.jamesmuirprints.com with password ohhimark

Screen shot below of my contact page. See the large gap between the main menu and my first line of text. This is the same on my about page and collection page.

Thanks

Hey @jarmuir , tried going to your site. The password you provided (nice, by the way) doesnt appear to be working. Did you update it recently?

Hi!

Thanks for getting back to me.

Password is now : Beranger

Thanks for your help.

Let me know if you need any more info.

As I said before im trying to reduce the white space where the page titles used to be, mainly on the about pages and contact.

You can add this at the bottom of your theme.scss.liquid file:

.template-page .main-content, .template-page .section-header {
    padding-top: 0;
    margin: 0;
}

Should be good to go.

2 Likes

can anybody help me on this: https://community.shopify.com/c/Technical-Q-A/How-to-Hide-the-Title-from-a-specific-page/m-p/899931#M35599