Jump to content

Five: Hide blog header content on posts?

Recommended Posts

Posted

I want to use the built-in Blog Header Content block for a blog-specific header when viewing the full blog feed, but I don’t want it to show up when viewing an individual post. Does anybody know how to hide it on posts only?

  • 4 months later...
  • Replies 11
  • Views 5.3k
  • Created
  • Last Reply
Posted

WOULD REALLY LOVE TO KNOW THIS AS WELL PLEASE! (:

  • 2 weeks later...
  • 2 weeks later...
Posted

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.

Posted

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.

Posted

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.

  • 11 months later...
Posted

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!

  • 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.