Archived topic
Disable content title
7 replies · Started by Andrew on August 15, 2016
Hey guys!
Is there a way to disable to page title/content title by default instead of on a page by page basis?
Hi Andrew,
There is a filter you can use to disable the content title completely: generate_show_title
More info on filters here: https://generatepress.com/knowledgebase/filter-list/
Hope this helps :)
Can you explain a bit more?
I added this to my theme functions file:
add_filter( 'generate_show_title', 'your_function_name' );
function your_function_name()
{
return 'false';
}
Doesn't seem to have changed anything.
You want to lose the apostrophes, this works
add_filter( 'generate_show_title', 'your_function_name' );
function your_function_name()
{
return false;
}
Gotcha. This still seems to leave a white bar at the top of the page though. Is there something else that needs to be hidden? My guess (and I am just guessing :) ) is that I hid the title, but the title area is the white area that is still visible?
That filter should hide everything title related, HTML included.
Can you link me to a page where the white bar is showing?
Ah, the content area has some top margin:
.entry-content, .entry-summary, .page-content {
margin-top: 0;
}