First time poster. PHP idiot.
I need to (re)write code that will display a div if a field is entered but to hide it if it's empty. The field is populated using a custom field in the backend of Wordpress.
I wrote this code many years ago and it used to work but no longer does. My skill level is 0. This is it:
I've hidden some bits for security.
I use CSS classes to either hide or show.
If anyone can shed some light I would be most appreciative. I've spent hours searching and trying but not clever enough to make it work.
I don't know if you can 'echo' a whole code block.