Button on Header Disappearing

I have a Donate button on my header. I want it to show up on my home page and various other pages but not on a few specific pages where the call to action is something other than “Donate”. I have figured out how to write code that hides an item on a specific page - exactly what I wanted it to do. However, when I go back to the Homepage, the button is still gone. If I load the website from “scratch” the Donate button is visible on the Homepage but if I navigate to the page where the button is hidden and then navigate back to the homepage, the button stays hidden. What have I done wrong?! Here’s my website: https://www.deepsouthcancer.org and the page where it is hidden is “Magic City Cycliad”. Help!

I believe that the site code processes prior to the page code, so what you can do is on the “Magic City Cycliad” page code, do:

$w.onReady( function () {
//TODO: write your page related code here…
$w(‘#nameofdonatebutton’).hide();
});

Then on the left hand side of your Code window, click the Site tab, then do:

$w.onReady( function () {
//TODO: write your page related code here…
$w(‘#nameofdonatebutton’).show();
});

Since the Site Code runs on every page, it will execute a show of the donate button on every page load but since this action occurs before your Page Code, when you get to the “Magic City Cycliad” page, it will execute a hide of the button instead.