Home › Forums › Back End › [WORDPRESS] Remove div IF textarea is empty for Events Post Type Function › Re: [WORDPRESS] Remove div IF textarea is empty for Events Post Type Function
@traq @chrisburton I used a test line that the author of the tutorial I followed recommended to me.
The test line is//
$ret = $ret . ‘INFO: {‘ . $event_info . ‘}‘ ;
By adding that code I could see if there was a space added into the textarea but no actual text. AND THERE WAS IN FACT A FEW SPACES!
So I edited the event with the empty Info, deleted the spaces and now…what do you know!!! The label “INFO” disappeared!!!!
I find that ridiculous though :/ A Few spaces could make such a difference.
Is there any possible way for WP to only display the INFO label if actual text was inserted?
Does that question even make sense?
I really apologize for wasting your time :/
Such a small mistake could cause so much confusion!