Sorry for going to basic, and for not getting back to you sooner. It’s always good to post code as someone would have caught the ! for you.
I’ve been developing WP sites many years and I still need to look things up, the only difference may be that I find what I’m looking for faster.