Changing header and footer on specific pages

Hey there! I’m currently creating a landing page on my website which will be used for marketing.

The other pages on my site both have a header and a footer, but the landing page will be a little different. It will not have a footer.

I know there’s a code to hide the footer which looks like this:

$w.onReady(function () {
    $w("#footer1").children.forEach((item, i) => {
        item.collapse();
    });
});

But there are two problems with this code.

  1. Although I have only selected the page I want this to take affect on, the footer is hidden on all pages.
  2. Although the footer is hidden, the space of the footer is still available when site is being previewed. I want it to collapse instead.

Secondly, I want the landing page’s header to be a little different than that of the other pages on the site.

How do I edit the landing page’s footer and header, making sure these changes only take effect on this page and no other page on the site?

Thanks,
Mohamad

Hi Mohamad, you don’t actually need code for this. Open the pages menu, then go to the settings of your landing page. You can then set it as a page without header and footer

Hey there, I’m aware of this feature. The issue is that I don’t need a footer, but I need a header.

The header, however, will be a little different from those on other pages.

Does this make sense?

Thanks!
Mohamad