Jump to content

Five: Hide blog header content on posts?

Recommended Posts

  • 4 months later...
  • Replies 11
  • Views 5.1k
  • Created
  • Last Reply
  • 2 weeks later...
  • 2 weeks later...

I found this code works in a way.


<style> #page-body-header {display:none} </style>

If you insert it on your blog page header code injection it will remove the header block. Unfortunately it removes it for both the index and posts.I'm not sure how to get it to only work in posts and leave the index alone.

Link to comment

Hazaar! I just worked it out.

In your blog post right at the top (might work anywhere but this is where it worked for me) add a code block. Leave the display source setting as HTML and make sure it is unchecked.

then clear the default message and enter the following code:


<style> #page-body-header {display:none} </style>

Then save the block and voila! Your blog page header content block will disappear from the blog post.

Link to comment

I haven’t tested this yet, but it’s good to know there’s a workaround out there. However, this isn’t a workable solution for me. For one thing, remembering to put this block into every post is just definitely not gonna happen. More importantly, though, I don’t want to be loading my posts with styles that might mess things up if I ever leave Squarespace. I want my blog posts to be totally valid and future-proof.

Link to comment
  • 11 months later...

Nothing like waking up in the morning knowing an issue needs to be solved and finding a clear working solution in two minutes. Thank you, eanderson!

Link to comment
  • 2 years later...

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.