Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Your website doesn’t load.
Thread Starter
jkgray
(@jkgray)
That’s funny, the link works for me. http://www.nursingnurture.com/
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Would you also like to remove these titles on other pages?
Thread Starter
jkgray
(@jkgray)
Potentially, but for now just this page.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
In your Child Theme stylesheet, add;
.home h1.entry-title {
text-indent: -9999 em;
}
As you can see, if you want to apply this change to all pages, remove the prepended .home
from the CSS selectors.
Thread Starter
jkgray
(@jkgray)
Hey , thanks so much. Does it matter where this code is added or can it be anywhere?
Also, what if – for example – there was one other page I wanted to omit the title from. How could I add code for an additional page I wanted to exclude the title on?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Hey , thanks so much. Does it matter where this code is added or can it be anywhere?
Try placing it at the bottom of the stylesheet, which is the general rule for adding new styles.
Also, what if – for example – there was one other page I wanted to omit the title from
You can use Google Chrome’s built-in Inspect Element, or any similar browser tool to easily view the HTML structure of your web page.
You ought to be looking for the <body>
element in your HTML structure, which has classes applied to it. Some of these classes are unique to the page, such as home
or page-id-98
.
For example, if you had;
<body class="page-id-98">
...
</body>
You could add to the CSS
.home h1.entry-title,
.page-id-98 h1.entry-title{
text-indent: -9999 em;
}
Here’s a resource for grouping CSS selectors
http://webdesign.about.com/od/cssselectors/qt/tipcssgroupsele.htm
Thread Starter
jkgray
(@jkgray)
I added the code to the end of the Child Theme but it didn’t remove the title.
Then I changed it and added
.home h1.entry-title,
.page-id-31 {
text-indent: -9999 em;
}
to the end of the Child Theme. I checked the code as you suggested and found the page id to be 31.
Didn’t work either. Any other thoughts?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I edited my CSS example from my last post, can you try the exampled code?
Thread Starter
jkgray
(@jkgray)
OK I added
.home h1.entry-title,
.page-id-31 h1.entry-title{
text-indent: -9999 em;
}
to the Child Theme and got the same results: http://www.nursingnurture.com
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Sorry, can you remove the space between the value, -9999
and the measurement em
?
Thread Starter
jkgray
(@jkgray)
Yes…that worked. Thanks for your help. I know just enough about this stuff to be REALLY dangerous, but help from folks like you are helping me learn tons everyday.
One other thing – any thoughts on how I can move the text and picture up toward the top to omit that wide white space left from the area once held by the title we omitted in the steps above?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You can replace text-indent: -9999em;
with display: none;
Thread Starter
jkgray
(@jkgray)
That worked…thanks again!