[Resolved] Hook Element to Replace Site Header Not Working

Home Forums Support [Resolved] Hook Element to Replace Site Header Not Working

Home Forums Support Hook Element to Replace Site Header Not Working

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1047241
    Vernon Lees

    I’ve added a new element Type ‘Hook’ and set to header, disable site header and execute PHP. Set for entire site apart from front page.

    Added the following code :

    <h1 class=”pagetitle”>{{post_title}}</h1>

    It’s not replacing the existing Site header.

    I’ve also separately tried adding a new layout element and setting this to disable the Site Header – set for entire site apart from front page, but this doesn’t seem to be working either.

    What am I missing?

    Thanks in advance. πŸ™‚

    #1047249
    Leo
    Staff
    Customer Support

    Hi there,

    Not exactly sure what you are trying to achieve here but would header element work better?
    https://docs.generatepress.com/article/header-element-overview/
    https://docs.generatepress.com/article/page-hero-examples/

    The template tags only work there.

    If not any chance you can provide an example of what the final result should be?

    Let me know πŸ™‚

    #1047253
    Vernon Lees

    Hi Leo

    Thanks for the super fast response as ever!

    I’ve used the header element here to pull in the title in the example. I want to get rid of the Site Header. I can use CSS but I thought that the layout element would be able to disable this?

    #1047263
    Leo
    Staff
    Customer Support

    Are you looking to disable the site header globally and just keep the header/navigation style?

    If so try checking this option:
    https://docs.generatepress.com/article/navigation-as-a-header/

    Let me know πŸ™‚

    #1047267
    Vernon Lees

    Hi Leo

    Yes that’s correct. However when I go to Customsing Layout / Header I don’t get the option to ‘Use Navigation as Header’ shown in the link. πŸ™ I’m on 1.8.3 version of the Plugin.

    #1047268
    Leo
    Staff
    Customer Support

    Try removing the navigation logo first then the option should show πŸ™‚

    #1047274
    Vernon Lees

    Hmmm. So I removed the image and the option appeared. However it has not got rid of the site header.

    #1047283
    Vernon Lees

    I should add as well that this is only affecting the desktop view not the mobile view.

    #1047290
    Leo
    Staff
    Customer Support

    That’s strange. The option should definitely remove the header when activated.

    What happens if you remove the site logo then re-add it?

    #1047294
    Vernon Lees

    Hey Leo. I found the answer!

    I was using a child theme and I guess it did not support the latest changes etc!

    Frustrating but glad to have found the issue. THanks for your assistance in helping me get to the bottom of this. πŸ™‚

    #1047295
    Leo
    Staff
    Customer Support

    Make sure this is not the issue otherwise there will be more customizer option problems:
    https://docs.generatepress.com/article/child-theme-issues/#import

    Glad I could help πŸ™‚

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