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

How do I hide Page Header in my Blog Category?


jamesaltonvisuals

Question

Site URL: https://jamesaltonvisuals.com/

Hi there,

I am trying to hide my page header on everything but my homepage. I've done this so far to make it work,

.page-header
{
  display: none;
}

#collection-5e9ced4eaae6d36c0e265c79 .page-header,
.homepage .page-header
{
  display: block;
}

But because my homepage is also my portfolio blog, I want to hide it when I select my categories such as 'Commercial'.

Is this possible? Or do I have an odd/non-standard setup here?

I find it frustrating that blog categories are hard links in the menu and therefore are treated as separate pages in the menu but they're also viewed as the homepage at the same time. It's very confusing!

Thank you!

James Alton Visuals 2020-12-03 at 19.27.51 PM.png

James Alton Visuals 2020-12-03 at 19.28.19 PM.png

Link to comment

1 answer to this question

Recommended Posts

  • 0

You may need to take advantage of javascript

<style>
	.page-header {
      display: none;
    }
</style>
<script>
  window.Squarespace.onInitialize(Y, function() {
      if ( window.location.pathname == '/' ){
          document.querySelector(".page-header").style.display = "block";
      }
  });
</script>

into Advance->Code Injection->Header

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for Squarespace
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...