Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Hide Hero Section on Frontpage via Theme Override?

  • #1111
    Avatar photo[anonymous]

    Hi there, I’m interested in hiding the Hero section on the front page of the Taste theme (see attached pic), but can’t figure out which code to remove from index.hbs

    Any suggestions?

    #1122
    Avatar photo[anonymous]

    Hi,

    Under index.hbs you have the following code:

    `{{#if @config.custom.textHero}}

    {{{@config.custom.textHero}}}
    {{ translate ‘frontpage.publishedBy’ }}
    {{siteOwner.name}}

    {{ translate ‘frontpage.refreshed’ }}

    {{/if}}`

    If you will make empty option Hero section -> Hero Text then it should disappear without editing the theme.

    #1129
    Avatar photo[anonymous]

    Hi Tomasz,

    Thanks for the reply! It looks like there is a bug with the Hero Section option in Publii however:

    [Tested on Publii v.0.35.3 on Windows 10]

    • Load Publii
    • Create a new website
    • Install Taste theme v1.8.1.0
    • Go to Theme –> Custom Settings –> Hero Section
    • Delete the default Hero text (“Your Kitchen Stories. The food blog“)
    • Click Save & Preview

    A preview website will load, and the default Hero text will still be there.

    • Go back to Publii
    • Click on “Settings”
    • Click back on “Theme”
    • Scroll down to Custom Settings –> Hero Section
    • The default Hero text has returned

    Looks like there is a bug with the Hero text being restored, instead of saved.

    #1136
    Avatar photoBob

    Hi,

    The default hero content is defined and “served” by the value attribute of a WYSIWYG field under config.json file under customConfig field.
    So, if you want to delete it permanently, just edit the index.hbs file.