Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Five: Hide blog header content on posts?


ablaze1570047688
Go to solution Solved by eanderson,

Question

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?

Edited by Jeng
retag
Link to post
  • Answers 11
  • Created
  • Last Reply

Top Posters For This Question

11 answers to this question

Recommended Posts

  • 1

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.

Edited by Carlos Anon
Link to post
  • 0

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 post
  • 0

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 post
Guest
This topic is now closed to further replies.

×
×
  • Create New...