Hide element on specific page with custom css #2054
-
Hello! Theme: Simple. I tried:
but it affects heros on all pages and posts. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi Astrosheepjpg,
Read this discussion #2008 |
Beta Was this translation helpful? Give feedback.
-
Hi, I didn't realize it was a homepage-type page :(
However, you can try other solutions:
|
Beta Was this translation helpful? Give feedback.
-
Does this work at all? .home-template div.hero {
display: none !important;
} Edit: nevermind, this doesn't work with a Page set as the homepage... The |
Beta Was this translation helpful? Give feedback.
Hi,
I didn't realize it was a homepage-type page :(
In this case, it's more complex because you would be affecting all pages:
main.page .hero {display: none;}
However, you can try other solutions:
Create a custom page template, eg
page-simple.hbs
that does not include the.hero
section. You can follow this tutorial: https://getpublii.com/dev/how-to-create-custom-templates/ (editing the config.json file, duplicating + modifying + renamingpage.hbs
).Modify
page.hbs
by adding a unique class/id for each page and then use that unique class/id to hide the section. We tackled a similar case in this post: #1706 (comment).