Keep header image at top of all pages

Hi All,

I am looking to keep the header image that is on the homepage across all of the pages in my site. Would anyone know if that is possible? Ideally I would not want it on the product pages.


Hello there,

Thank you for contacting us about our theme Leto. I am happy to help with your queries.

To retain the main header image on non-home pages, try adding this PHP snippet to your child theme’s functions.

     * Hero area for non-homepage
    function leto_hero_slider_nonhomepage() {

    	if ( !is_front_page() ) {
        echo '<div class="hero-area">';
    	  echo '</div>';
    add_action( 'leto_after_header', 'leto_hero_slider_nonhomepage' );

If you don’t have a child theme, you will use an extra plugin that allows you to add functions to your site, like Code Snippets.

Once the plugin activated, you will see a new admin menu in the left side that reads “Snippet”. Add new snippet from this menu and insert the code above. Ensure the snippet is runnin on the frontend. Save and activate snippet.

Then add the below CSS code to Appearance > Customize > Additional CSS from dashboard.

    body:not(.home) {
      background-color: transparent;
      position: absolute;
      width: 100%;
      z-index: 998;
      top: 0;
      left: 0;
      background-color: transparent;
      -webkit-transition: background-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      transition: background-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);  

I hope this reply helps. Let me know your views.

aThemes Support

Thank you for your time and effort, that works :slight_smile:
It is much appreciated.

You’re welcome!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

aThemes Support