It works fine on those pages. Thank you!
I assume I can reuse this code with all the other pages I need to hide. Can I put the page ids as a list, or does each one have to be coded in individually?
This is a wonderful short-term solution, but at the end of the summer, I hand the site back over to the original managers. None of them are very comfortable with WordPress and would not continue adding to the code every year as the new pages are added, and so this will not work in the long term.
If you can come up with any longer-term solution (linked to the sidebar layout, the particular widget in the sidebar, or any number of other options) that would be much appreciated. I’d prefer to avoid taking down the sticky menu for the entire site if at all possible.