Archived topic
What "Disable Content Title" do at code
5 replies · Started by Radek on April 17, 2019
Hi, I'd like to know, what exactly do checking box "Disable Elements - Content Title" on standalone page to code.
If I check,
<header class="entry-header">...</header>
is completly missing from page code.
I'm trying hide "Page titles" only on PC view, due to toggled menu I want to show it on mobiles and tablets.
As a workaround I use this:
@media (min-width:768px) {
.entry-title {
display: none;
}
}
But I want code as clean as possible, so I'd like use the same way as check box do, but only for @media...
Hope You understand my terrible english.
Thanx Radek
Hi there,
you're current method is the best way to do this.
The alternative would require some PHP to remove the element based on screen sizes but this method is not 100% accurate so some browsers may still display the element.
Hi, thanx but anyway what exactly checkbox do ?
The entry-title is hooked into the Post Template. The check box adds a condition that unhooks the entry-title, so no HTML is actually output
Thank You very much, marking as resolved ;)
You're welcome