Hi Elliot,
It’s definitely not the if statement as it still doesn’t work when I remove it. However, (bit of a “duh” moment for me here) it’s surely what you said about it not working before the init action. Brain-fade on my part not to try attaching the code to a hook! I’ll come back and hit the big green “solved” button as soon as I test this.
Really appreciate your time, as always. Thank you.
Joel.