Archived topic
Disable page header for category pages
3 replies · Started by Brian King on July 30, 2015
When a visitor clicks on a category, I'm using is_category() function within the 'Inside Content Container' hook to display my own title.
But the original page header is shown; so duplicate category headers are shown.
Is there a way to disable the original page header using GP addons, so that only my text in the hook is shown?
To get rid of the text in the HTML, you can use this filter: https://gist.github.com/generatepress/926d49a7b3e0919c992a
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Then to remove the container, add this CSS:
.category .page-header {
display: none;
}
Adding CSS: https://generatepress.com/knowledgebase/adding-css/
That should do it :)
Unfortunately my custom header was using "single_cat_title" so this didn't work.
However using the css ".page-header { display: none; }" did the trick.
Thank you for your help.
Ah - didn't think of that.
You shouldn't have any issues just hiding the first one then :)
