Sign in

Hide Hero Section on Frontpage via Theme Override?

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

    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 photoTomasz Dziuda

    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.

     

    --
    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
    Avatar photoscvanpub

    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.

    --
    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.