[Resolved] Disable page header for category pages

Home Forums Support [Resolved] Disable page header for category pages

Home Forums Support Disable page header for category pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #124968
    Brian King

    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?

    #125000
    Tom
    Lead Developer
    Lead Developer

    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 ๐Ÿ™‚

    #125032
    Brian King

    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.

    #125046
    Tom
    Lead Developer
    Lead Developer

    Ah – didn’t think of that.

    You shouldn’t have any issues just hiding the first one then ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.