Hide or remove the Hero section title from the homepage only #2008
-
I am using the Mercury theme and would like to remove the Hero section title from the homepage only. When I remove the text from Theme > Layout > Hero section , it automatically adds the following title "Your photography stories Capturing life with natural light photography". I did find a previous post for hiding the title of all posts by using CSS (Tools & Plugins -> Custom CSS):
Any simple way to use custom CSS but only for the homepage Hero text, not all post/page titles? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, try this CSS:
This should apply only to the homepage since the From an SEO perspective, keep in mind that this only hides .hero visually, but it remains in the readable content of the page. Another solution is to modify the index.hbs file. |
Beta Was this translation helpful? Give feedback.
-
The text "Your photography stories Capturing life with natural light photography" ist the standard text. You can find (and change it) in the config.json.
|
Beta Was this translation helpful? Give feedback.
Hi, try this CSS:
main:not([class]) .hero {display: none;}
This should apply only to the homepage since the
<main>
tag has no classes. Other pages using .hero have specific classes on the<main>
tag.From an SEO perspective, keep in mind that this only hides .hero visually, but it remains in the readable content of the page.
Another solution is to modify the index.hbs file.