Sign in

Hide Hero Section on Frontpage via Theme Override?

  • This topic has 3 replies, 3 voices, and was last updated 3 weeks ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1111
    scvanpub

    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?

     

     

    Attachments:
    #1122
    Tomasz DziudaTomasz Dziuda
    Moderator

    Hi,

    Under index.hbs you have the following code:

    {{#if @config.custom.textHero}}
    <section class="hero">
    <header>
    {{{@config.custom.textHero}}}
    <address>
    {{ translate 'frontpage.publishedBy' }}
    {{siteOwner.name}}
    </address>
    {{ translate 'frontpage.refreshed' }}
    <time datetime="{{date @website.lastUpdate 'YYYY-MM-DDTHH:mm'}}">
    {{#checkIf @config.custom.formatDate '!=' 'custom'}}
    {{date @website.lastUpdate @config.custom.formatDate}}
    {{else}}
    {{date @website.lastUpdate @config.custom.formatDateCustom}}
    {{/checkIf}}
    </time>
    </header>
    </section>
    {{/if}}

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

     

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #1129
    scvanpub

    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
    BobBob
    Support

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

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