@tw2113 Thank you for your quick response! You were spot on.
Looking back, I had created the field as an ACF True/False field (not a checkbox as described in the article), which stores as an integer 0 or 1 not as a boolean.
Changing the line:
if ( 1 === $excluded ) {
to:
if 1 == $excluded ) {
did the trick.
Many thanks!
@dcooney Your solution of adding the default.php file to the template directory has fixed my issue. Thank you very much!